(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.
Regards,
    Malcolm

_______________________________________________
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime

Reply via email to