[Haskell-cafe] Is Template Haskell a suitable macro language?

Jacques Carette carette at mcmaster.ca
Tue Apr 24 13:15:42 EDT 2007


Josef Svenningsson wrote:
> On 4/24/07, Jacques Carette <carette at mcmaster.ca> wrote:
>> In Ocaml, you can frequently use polymorphic variants to get the same
>> effect.
>>
>> Which means that if you are willing to do enough type-class-hackery, it
>> should, in principle, be possible to do the same in Haskell.  But it
>> sure isn't as convenient!
>>
> You seem to imply that there is an encoding of polymorphic variants in
> Haskell using type classes. While I know that it's possible to achieve
> similar effects using type classes I haven't seen a direct encoding.
> If there is such an encoding I would be very interested to hear about
> it.
As usual, look for a solution from Oleg:
http://www.haskell.org/pipermail/haskell/2006-July/018172.html

There was also a proposal by Koji Kagawa (published at Haskell '06)
http://portal.acm.org/citation.cfm?id=1159842.1159848&coll=&dl=ACM&type=series&idx=1159842&part=Proceedings&WantType=Proceedings&title=Haskell&CFID=15151515&CFTOKEN=6184618

Jacques


More information about the Haskell-Cafe mailing list