snapframework / snap

Top-level package for the official Snap Framework libraries, includes the snaplets API as well as infrastructure for sessions, auth, and templates.
http://snapframework.com/
BSD 3-Clause "New" or "Revised" License
455 stars 68 forks source link

Can't build the 'snap' executable with --enable-executable-dynamic #78

Closed ppalka-rh closed 11 years ago

ppalka-rh commented 11 years ago

If you try building snap like so:

$ cabal install snap --enable-executable-dynamic

It will eventually fail when building the snap executable because of the executable's use of TH. The fix is quite easy: add extensions: TemplateHaskell to the Executable snap block in snap.cabal.

Building a dynamic/profiling library or executable that uses TH requires that it gets built twice: once the vanilla way, and then the dynamic/profiling way. Cabal handles this edge case as long as it knows that TH is in use.