[Haskell-cafe] Type extensions

Henning Thielemann lemming at henning-thielemann.de
Wed Jun 1 11:12:06 EDT 2005


On Wed, 1 Jun 2005, Thomas Davie wrote:

> On 1 Jun 2005, at 15:54, Henning Thielemann wrote:
>
> > What about
> >
> > data MyTree a = Branch a (MyTree a) (MyTree a) | Node a
> >
> > and the types
> >  MyTree ()
> >  MyTree Bool
> >  MyTree (Bool, Int)
> >  ?
>
> That's exactly what I would normally do, but my data type is in a
> library and is not parameterised.

Then it is the wrong library. :-)



More information about the Haskell-Cafe mailing list