[Haskell-cafe] Typeclass question

Miguel Mitrofanov miguelimo38 at yandex.ru
Sat Dec 27 14:49:30 EST 2008


Seems like you want an existential type:

data Foo = forall a. Bar a => Foo a Bool

On 27 Dec 2008, at 22:24, Andrew Wagner wrote:

> I'm sure there's a way to do this, but it's escaping me at present.  
> I want to do something like this:
>
> data Foo = Bar a => Foo a Bool ...
>
> That is, I want to create a new type, Foo, whose constructor takes  
> both a Boolean and a value of a type of class Bar.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list