[Haskell-cafe] Why were datatype contexts removed instead of "fixing them"?

harry voldermort at hotmail.com
Thu Apr 25 14:35:43 CEST 2013


Kim-Ee Yeoh <ky3 <at> atamo.com> writes:

> data Foo a where
>   Foo :: Eq a => a -> Foo a
> 
> is equivalent to
> 
> data Foo a = Eq a => Foo a
> 
> but is different from
> 
> data Eq a => Foo a = Foo a

... and nothing in GADTs does what one would naively expect the last
declaration to do.




More information about the Haskell-Cafe mailing list