[clean-list] How can I define an equality test ?

Ferreira Maurizio maurizio.ferreira at seling.it
Fri Nov 23 16:49:02 MET 2007


Im trying to define the == operator
with  an algebraic data type.
How can I define it ?
what have I to write i the following example, instead of ????
Regards
maurizio


module test
import StdEnv

:: Day = Mon | Tue | Wed | Thu | Fri | Sat | Sun 

instance == Day
where
  (==) :: Day Day -> Bool
  (==) x y = x ????? y   ////  what have I to write ?
  
IsGood :: Day -> Bool
IsGood x = x == Mon

Start = IsGood Mon  



More information about the clean-list mailing list