[Haskell-beginners] Data declarations
aditya.siram at gmail.com
Fri Jun 3 15:37:59 CEST 2011
> One more question, out of curiosity: In your above example, you could change
> data Populated = Populated
> data New = New
> to simply
> data Populated
> data New
> correct? You might as well, right, since your constructors take no
> values, and you are just using them as phantom types?
Yes I think that's correct. You might also look at GADT's  which
cover some of the same use-cases.
More information about the Beginners