Hi! Surely this is obvious, but I cannot figure out how to properly deal with class constraints and monads. For instance, when trying instance Monad Set.Set where xs >>= f = Set.unionSet (Set.map f xs) return x = Set.single x fail s = Set.empty hugs complains that it "Cannot justify constraints in instance member binding" for >>=. unionSet type is Eq a => Set (Set a) -> Set a Thanks, kirstin -- Always look over your shoulder because everyone is watching and plotting against you.
- help, classes! kirstin reese
- help, classes! kirstin reese
- Re: help, classes! William Lee Irwin III
- RE: help, classes! Mark P Jones
- Re: help, classes! Fergus Henderson
- Re: help, classes! kirstin reese
- Re: help, classes! Jan de Wit