[Haskell-cafe] Associated data types

Eyal Lotem eyal.lotem at gmail.com
Wed Dec 10 08:12:21 EST 2008


If we have associated type synonyms, is there still reason to have
associated data types?

For example, we can replace:

class C b where
 data D b
 ...

instance C Int where
 data D Int = D | E

with:

class C b where
 type D b
 ...

data DInt = D | E
instance C Int where
 type D Int = DInt


Or perhaps allow, for convenience, this form (which would desugar to the
above):

class C b where
 type D b
 ...

instance C Int where
 data D Int = D | E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20081210/804e828e/attachment.htm


More information about the Haskell-Cafe mailing list