1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
definition module gastje
import StdGeneric
from StdOverloaded import class ==
from GenEq import generic gEq
test :: p -> [String] | prop p
class prop a where holds :: a Prop -> [Prop]
instance prop Bool
instance prop (a->b) | prop b & testArg a
class testArg a | gen{|*|}, string{|*|}, gEq{|*|} a
:: Prop
generic gen a :: [a]
derive gen Int, Bool, Char, UNIT, PAIR, EITHER, CONS, OBJECT, RECORD, FIELD
generic string a :: a -> String
derive string Int, Bool, Char, UNIT, PAIR, EITHER, CONS of gcd, OBJECT, RECORD of grd, FIELD of gfd
:: For t = E.p: (For) infix 0 (t -> p) [t] & prop p
instance prop (For t) | string{|*|} t
:: Implies = E.p: (==>) infix 0 Bool p & prop p
instance prop Implies
:: Equals a = (=.=) infix 4 a a
instance prop (Equals a) | ==, string{|*|} a
|