
On Fri, Mar 19, 2010 at 8:15 AM, Ozgur Akgun
Hi Cafe!
Disclaimer: I know what I'm going to ask is now available as a language feature normally.
Did you mean "not available"? I don't know of a Haskell language feature for this, so if you really did mean "now" then I'd love to learn about the feature you're thinking of. Only think I can think of is having the constructors, as seperate data
types, introducing new type classes to group every possible subset of [X,Y,Z] and [A,B,C,D] and use those type classes when defining the functions. But as you can imagine, this is not the only place I want to use this thing, and the code will start to look cryptic if I do so. I must add, I want to use this *disjunction of constructors* thingy in data type declerations as well.
It looks to me like you want dependent types. You might look at Agda. It's similar to Haskell but features dependent types and other interesting things. Jason