
27 Sep
2007
27 Sep
'07
9:33 a.m.
Thomas Conway writes:
On 9/27/07, ok
wrote: I have often found myself wishing for a small extension to the syntax of Haskell 'data' declarations. It goes like this: ['where' clause to allow locally defined names in type declarations]
Nice.
Quite a few times I've found myself declaring type synonyms for this reason, but you end up polluting the global namespace.
+1 vote.
Data with where? You haven't heard about GADTs? http://en.wikibooks.org/wiki/Haskell/GADT http://www.haskell.org/haskellwiki/Generalised_algebraic_datatype Jerzy Karczmarczuk