GenLibTest.dcl 1.17 KB
Newer Older
1
definition module Gast.GenLibTest
Bas Lijnse's avatar
Bas Lijnse committed
2 3 4 5

/*
	GAST: A Generic Automatic Software Test-system
	
6
	Gast.GenLibTest: library for generic testing: showing and comparing values
Bas Lijnse's avatar
Bas Lijnse committed
7 8 9 10 11 12 13 14 15 16

	Pieter Koopman, 2004
	Radboud Universty, Nijmegen
	The Netherlands
	pieter@cs.ru.nl
*/

import StdGeneric, GenEq

import StdClass
17
//instance + String
Bas Lijnse's avatar
Bas Lijnse committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

(@@) infixl 2 :: (a->b)  a -> b
(@@!)infixl 2 :: (a->b) !a -> b

generic genShow a :: String Bool a [String] -> [String]
generic gLess a  :: a a -> Bool

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}, [], (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,), (,,,,,,,,), (,,,,,,,,,), (->), {}, {!}
derive gLess    Int, Char, Bool, Real, String, UNIT, PAIR, EITHER, OBJECT, CONS, FIELD, [], (,), (,,), (,,,), (,,,,), (,,,,,), (,,,,,,), (,,,,,,,), (,,,,,,,,), (,,,,,,,,,) 

show  :: !a -> [String] | genShow{|*|} a
show1 :: !a ->  String  | genShow{|*|} a

(-<-) infix 4 :: !a !a -> Bool | gLess{|*|} a
(->-) infix 4 :: !a !a -> Bool | gLess{|*|} a
(-<=) infix 4 :: !a !a -> Bool | gLess{|*|} a
(=>-) infix 4 :: !a !a -> Bool | gLess{|*|} a