[Haskell-cafe] Strange typing?

Jason Dagit dagit at codersbase.com
Fri Mar 19 15:39:11 EDT 2010

On Fri, Mar 19, 2010 at 8:15 AM, Ozgur Akgun <ozgurakgun at gmail.com> wrote:

> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100319/1d6901a8/attachment.html

More information about the Haskell-Cafe mailing list