RE: [Template-haskell] Avoiding linking final executable to TH
Einar raises another TH-linking question: how to avoid linking the TH libraries (which are needed at compile time) into the runtime executable. The difficulty is that GHC doesn't know for sure that you aren't going to need the libraries at runtime too. If you do a batch link step ghc -o foo This.o That.o Main.o -package mylib does that work ok? Is the problem only with --make? I'm reluctant to have two kinds of imports. Other ideas welcome. Better still, someone willing to take up the cudgels. Again, once the specification is clear, we can offer guidance. Simon | -----Original Message----- | From: template-haskell-bounces@haskell.org [mailto:template-haskell-bounces@haskell.org] On | Behalf Of Einar Karttunen | Sent: 04 July 2005 09:48 | To: template-haskell@haskell.org | Subject: [Template-haskell] Avoiding linking final executable to TH | | Hello | | Are there currently any plans to avoid linking the final executable with | TH? As far as I understand currently the situation is as follows: | | Module M uses TH code defined in MTH. | Module MTH imports TH modules and thus needs to be linked with template-haskell. | | The simplest way to deal with this could be to use a special | compile-time import construct between M and MTH - so that MTH would | not need to be linked with M (and thus template-haskell would not be | needed either). | | Are there any plans regarding something like this or an another solution? | | - Einar Karttunen | _______________________________________________ | template-haskell mailing list | template-haskell@haskell.org | http://www.haskell.org/mailman/listinfo/template-haskell
participants (1)
-
Simon Peyton-Jones