[clean-list] overloading problem

Marc/Pop Poppleton marc.poppleton@wanadoo.fr
Tue, 3 Apr 2001 18:20:00 +0200


Hello cleaners!

I've got a little problem with the following program:

     import StdEnv,StdList

     :: Set a :== [a]

     isinset :: a (Set a) -> Bool | ==a
     isinset x set=isMember x set

     intersect :: (Set a) (Set a) -> (Set a) | ==a
     intersect [] []=[]
     intersect x y=[r \\ r <- x | (isinset r y)]

When I do "Start=(intersect [] [])" I get the following Error:
     "Start" cannot be overloaded: Set a | ==a"
Whereas when I do "Start=(intersect [1,2,3] [2,3,4]" I get the correct
answer.
What am I doing wrong?
  

-- 
Best regards,
 Marc/Pop                          mailto:marc.poppleton@wanadoo.fr