[Haskell-cafe] A type level puzzle
amindfv at gmail.com
amindfv at gmail.com
Sat Aug 15 14:50:13 UTC 2015
In Vivid 0.2 (out any day now!) I use type strings pretty pervasively. I'd say that for my needs they were really useful, but the design phase was long (and kinda painful). I can imagine many cases where they're too painful and/or not powerful enough but I'm very happy with what I ended up with.
A-, would type string again.
tom
El Aug 15, 2015, a las 9:35, Silvio Frischknecht <silvio.frischi at gmail.com> escribió:
>> A good headache or a bad headache? If it's hard to learn but ultimately
>> satisfying and useful then I'm all up for it. If it's hard to learn because
>> Haskell doesn't really support it naturally then I'll probably avoid it.
>
> Well that depends on how you look at it. GHC has a fair number of
> extensions for dealing with type level programming. And there surely is
> a reason for all of them. And you can get some elegant type level
> programming. But it's hard to get right. It's is especially hard if you
> want Haskell to infer your types. It can definitely be worth it. I coded
> a unit system the day before yesterday. I'm using it in my project now
> and that was definitely worth it. But I've done stuff like this before
> and it usually takes a few days for me to wrap my head around things.
>
> Btw. I'm just an enthusiast. I don't do this professionally.
>
> I can tell you the extensions you will probably need and that you should
> have a look at.
>
> TypeFamilies - often useful (closed type families for defaults)
> KindSignatures - for working with different kinds such as Symbol
> TypeOperators - for making typelevel operators
>
> DataKinds - If you want to make your own kinds (probably not needed)
>
>
> Silvio
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list