Simon Peyton-Jones wrote:
Another reasonable alternative isdata Set a = Eq a => Set (List a) The type of member would become member :: a -> Set a -> Bool (with no Eq constraint).
John Hughes mentions this in section 5.2 of the paper, and points out a problem: a function like (singleton :: a -> Set a) would have to construct a dictionary out of nowhere. I think you need an Eq constraint on singleton, which means that you still can't make Set an instance of Monad.
-- Ben _______________________________________________ Haskell-prime mailing list [email protected] http://haskell.org/mailman/listinfo/haskell-prime
