Template Haskell now requires -dynamic or -dynamic-too
I have the following files:
{-# LANGUAGE TemplateHaskell #-}
module THSplice where
number3 = [| 3 |]
{-# LANGUAGE TemplateHaskell #-}
module Main where
import THSplice
main = putStrLn (show $number3)
When I say ghc Main.hs
, I get this:
[1 of 2] Compiling THSplice ( THSplice.hs, THSplice.o )
[2 of 2] Compiling Main ( Main.hs, Main.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Main.hs:7:23:
cannot find normal object file ‛./THSplice.dyn_o’
while linking an interpreted expression
It's possible a different collection of flags could get this to work, but I think this behavior goes against the intended "it just works" flavor of --make
.
This is a regression bug -- ghc 7.6.3 does the right thing.
I'm on MacOS 10.7.5, Xcode 4.3.3.
Trac metadata
Trac field | Value |
---|---|
Version | 7.7 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | MacOS X |
Architecture | x86_64 (amd64) |