
17 Jan
2011
17 Jan
'11
6:33 a.m.
-- My intension is that the PERSON class should *specify* -- that a person has a constant id called p1 -- and that a person has a name that can be found from the id. class PERSON a b where p1 :: a name :: a -> b -- My intension is that the instance should implement the PERSON class instance PERSON Int String where p1 = 1 name p1 = "john" -- -- Why does the evaluations of p1 or name p1 produce errors? -- how do I fix them and still keep the basic instance-implements-class relation? -- Thanks, -- Pat This message has been scanned for content and viruses by the DIT Information Services E-Mail Scanning Service, and is believed to be clean. http://www.dit.ie