Commit 88e06c82 authored by Steffen Michels's avatar Steffen Michels

add instances for ()

parent aecdb777
Pipeline #26697 passed with stage
in 47 seconds
...@@ -58,7 +58,7 @@ ggenString :: Int Real Int Int RandomStream -> [String] ...@@ -58,7 +58,7 @@ ggenString :: Int Real Int Int RandomStream -> [String]
derive ggen Int, Bool, Real, Char, String derive ggen Int, Bool, Real, Char, String
derive ggen UNIT, PAIR, EITHER, CONS of gcd, OBJECT of gtd, FIELD of d, RECORD of grd derive ggen UNIT, PAIR, EITHER, CONS of gcd, OBJECT of gtd, FIELD of d, RECORD of grd
derive ggen (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,) derive ggen (), (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,)
derive ggen [], [!], [ !], [!!] derive ggen [], [!], [ !], [!!]
derive ggen {}, {!} derive ggen {}, {!}
......
...@@ -211,7 +211,7 @@ where ...@@ -211,7 +211,7 @@ where
ggen{|String|} s = ["hello world!","Gast","":ggenString StrLen 4.0 32 126 aStream] ggen{|String|} s = ["hello world!","Gast","":ggenString StrLen 4.0 32 126 aStream]
derive ggen (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,) derive ggen (), (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,)
derive ggen [], [!], [ !], [!!] derive ggen [], [!], [ !], [!!]
ggen{|{}|} fx r = [{x \\ x <- xs} \\ xs <- ggen{|*->*|} fx r] ggen{|{}|} fx r = [{x \\ x <- xs} \\ xs <- ggen{|*->*|} fx r]
ggen{|{!}|} fx r = [{x \\ x <- xs} \\ xs <- ggen{|*->*|} fx r] ggen{|{!}|} fx r = [{x \\ x <- xs} \\ xs <- ggen{|*->*|} fx r]
......
...@@ -25,7 +25,7 @@ generic gLess a :: a a -> Bool ...@@ -25,7 +25,7 @@ generic gLess a :: a a -> Bool
derive genShow Int, Char, Bool, Real, String, derive genShow Int, Char, Bool, Real, String,
UNIT, PAIR, EITHER, OBJECT, CONS of {gcd_name,gcd_arity}, RECORD of {grd_name}, FIELD of {gfd_name}, UNIT, PAIR, EITHER, OBJECT, CONS of {gcd_name,gcd_arity}, RECORD of {grd_name}, FIELD of {gfd_name},
{}, {!}, [], [!], [ !], [!!], (->), {}, {!}, [], [!], [ !], [!!], (->),
(,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,), (,,,,,,,,), (,,,,,,,,,) (), (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,), (,,,,,,,,), (,,,,,,,,,)
derive gLess Int, Char, Bool, Real, String, derive gLess Int, Char, Bool, Real, String,
UNIT, PAIR, EITHER, OBJECT, CONS, FIELD, RECORD, UNIT, PAIR, EITHER, OBJECT, CONS, FIELD, RECORD,
[], [],
......
...@@ -42,6 +42,7 @@ genShow{|[]|} f sep p xs rest = ["[" :showList f xs [ "]":rest]] ...@@ -42,6 +42,7 @@ genShow{|[]|} f sep p xs rest = ["[" :showList f xs [ "]":rest]]
genShow{|[!]|} f sep p xs rest = ["[!":showList f xs [ "]":rest]] genShow{|[!]|} f sep p xs rest = ["[!":showList f xs [ "]":rest]]
genShow{|[ !]|} f sep p xs rest = ["[" :showList f xs ["!]":rest]] genShow{|[ !]|} f sep p xs rest = ["[" :showList f xs ["!]":rest]]
genShow{|[!!]|} f sep p xs rest = ["[!":showList f xs ["!]":rest]] genShow{|[!!]|} f sep p xs rest = ["[!":showList f xs ["!]":rest]]
genShow{|()|} _ _ _ rest = ["()": rest]
genShow{|(,)|} f1 f2 sep p (x1,x2) rest = ["(":f1 sep False x1 [",":f2 sep False x2 [")":rest]]] genShow{|(,)|} f1 f2 sep p (x1,x2) rest = ["(":f1 sep False x1 [",":f2 sep False x2 [")":rest]]]
genShow{|(,,)|} f1 f2 f3 sep p (x1,x2,x3) rest = ["(":f1 sep False x1 [",":f2 sep False x2 [",":f3 sep False x3 [")":rest]]]] genShow{|(,,)|} f1 f2 f3 sep p (x1,x2,x3) rest = ["(":f1 sep False x1 [",":f2 sep False x2 [",":f3 sep False x3 [")":rest]]]]
genShow{|(,,,)|} f1 f2 f3 f4 sep p (x1,x2,x3,x4) rest genShow{|(,,,)|} f1 f2 f3 f4 sep p (x1,x2,x3,x4) rest
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment