
31 Mar
2004
31 Mar
'04
8:41 a.m.
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.
www.cs.chalmers.se/~rjmh/Papers/restricted-datatypes.ps 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 severe? Christian