[Haskell] Announce: ~Haskell 2011

Malcolm Wallace malcolm.wallace at me.com
Thu Jan 20 14:26:37 CET 2011

>> (a) we wish to accept the NoDatatypeContexts proposal
>>     http://hackage.haskell.org/trac/haskell-prime/wiki/NoDatatypeContexts
> The Trac-Wiki says: "What removing the datatype contexts from a source
> file will do is make some previously illegal programs legal." What  
> is an
> example?

As on the wiki,
     data Eq a => Foo a = Constr a
     getVal :: Foo a -> a
     getVal (Constr x) = x
would previously have been rejected.  Once the compiler forces the  
user to remove the Eq a => context on the datatype, the rest of the  
program will be accepted.

More information about the Haskell-prime mailing list