valderman / haste-compiler

A GHC-based Haskell to JavaScript compiler
http://haste-lang.org
BSD 3-Clause "New" or "Revised" License
1.45k stars 109 forks source link

Template Haskell support status #66

Open wdanilo opened 11 years ago

wdanilo commented 11 years ago

Hi! I want to ask you if you plan to support Template Haskell? As far as I understand it should be not big deal, because ghc can generate (in compile time) final pure Haskell code (out of mixed template code), so it should not theoretically change anything in your pipeline?

valderman commented 11 years ago

The main issue is library support. TH needs to use the same libraries as it's operating on, which means that (mainly) Haste's tuned integer-gmp library causes vanilla GHC to barf on a bunch of unresolved externals. As far as I can tell, this is the only real obstacle (the changes to base are small enough that conditional compilation would be quite enough there).

I'm going to look into fixing this, since it seems TH could be supported without too much hassle.

bshepherdson commented 11 years ago

Has there been any progress here? I'm only making light use of TH (generating lenses from records) and it seems like that's all that's holding me back from full Haste compatibility on this project.

mahmoudm commented 11 years ago

I was looking into using TH as well for client-side templating. Would love to see progress in this area.

LeviSchuck commented 10 years ago

I'd be really excited when/if something like Hamlet ends up working

katyo commented 10 years ago

Things like TH are very useful in webdev. Apart from templating, I would like to render parameterized yesod's routes to generate links in client-side code.

rikvdkleij commented 9 years ago

Aeson depends on template-haskell. So it would be really nice if Haste supports template-haskell.

It's big advantage of using on client and server same code for your domain model. But if Aeson library does not work(I also did not get it installed with haste-inst) , it just stops.... I can also look to another json library, but Aeson is most used. Also in other libraries.

ricogallo commented 8 years ago

+1

michaelmesser commented 8 years ago

+1

doofin commented 6 years ago

+1