Brian Troutwine wrote:
Do you have any reason not to do the above?
Yes, the subset types that I wish to define are not clean partitions,
though my example does suggest this. Let's say that the definition of
Foo is now
data Foo = One | Two | Three | Four | Five | Six
while Odd and Even
Brian Troutwine wrote:
Hello all.
I would like to define a data type that is the super-set of several
types and then each of the proper subset types. For example:
data Foo = One | Two | Three | Four
data Odd = One | Three
data Even = Two | Four
This, of course, does not work. It