
3 Jun
2011
3 Jun
'11
9:37 a.m.
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 [1] which cover some of the same use-cases. -deech [1] http://www.haskell.org/haskellwiki/GADT