[Haskell-cafe] Adding Ord constraint to instance Monad Set?

Christian Maeder maeder at tzi.de
Wed Mar 31 15:41:47 EST 2004

Simon Peyton-Jones wrote:
> Yes, it is, I believe.  Constraints on data type declarations are a
> mis-feature.  I tried to get them removed, but there was some argument
> that they could be made useful (see John Hughes's paper "Restricted data
> types in Haskell", Haskell workshop 1999), and they stayed. 


Indeed, John Hughes discusses this very "Set Monad" problem (p. 5). His 
proposed language extension was not implemented.

(It would free the user to explicitely add the constraint "Ord a" for 
every function over Set.)

Maybe the consequences for the language/prelude/compiler would be too 


More information about the Haskell-Cafe mailing list