[Haskell-cafe] Existentially-quantified constructors, Eq and Show

Tomasz Zielonka tomasz.zielonka at gmail.com
Thu Dec 8 03:13:10 EST 2005


On Wed, Dec 07, 2005 at 04:09:31PM -0800, John Meacham wrote:
> you arn't using existential types here. an example with an existential
> type would be (in ghc syntax)
> 
> > data forall a . State
> >     = Start
> >     | Stop
> >     | (Show a, Eq a) => State a

Shouldn't it be:

> data State
>     = Start
>     | Stop
>     | forall a . (Show a, Eq a) => State a

?

Best regards
Tomasz

-- 
I am searching for a programmer who is good at least in some of
[Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland


More information about the Haskell-Cafe mailing list