[Haskell-cafe] Strange typing?

Ozgur Akgun ozgurakgun at gmail.com
Fri Mar 19 16:00:21 EDT 2010


Jason,

Oh sorry. I definitely meant not available. I hope it was available though
:)
I'll look into dependent types, sure. But as I said, I can come up with a
way (even though it is ugly) via promoting every constructor to a data type
and using type classes to group different types. This makes me think there
can be a more elegant way of handling it.

Matthias,

I searched in the list, but couldn't find the discussion you've reffered. Do
you have a link to it by any chance?


Thanks for the comments. Anyone else?


On 19 March 2010 19:39, Jason Dagit <dagit at codersbase.com> wrote:

>
>
> 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
> things.
>
> Jason
>



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


More information about the Haskell-Cafe mailing list