[GHC] #8180: Template Haskell now requires -dynamic or -dynamic-too (was: ghc --make uses wrong way with Template Haskell)

GHC ghc-devs
Fri Oct 11 10:32:33 UTC 2013


#8180: Template Haskell now requires -dynamic or -dynamic-too
-------------------------------------+------------------------------------
        Reporter:  goldfire          |            Owner:
            Type:  bug               |           Status:  new
        Priority:  highest           |        Milestone:  7.8.1
       Component:  Compiler          |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------
Changes (by simonmar):

 * cc: igloo (added)
 * priority:  normal => highest
 * architecture:  x86_64 (amd64) => Unknown/Multiple
 * milestone:   => 7.8.1
 * os:  MacOS X => Unknown/Multiple


Comment:

 We must do something about this, I think it's going to cause a lot of
 grief after 7.8.1 comes out.

 If you compile a program with TemplateHaskell (or Annotations), it now
 fails unless you also use `-dynamic` or `-dynamic-too`.  And if you use
 `-dynamic-too` with `-o`, you also get this bogus-looking error:

 {{{
 '/home/simon/code-all/work/ghc-validate/inplace/bin/ghc-stage2' -fforce-
 recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db
 -rtsopts -fno-ghci-history --make -o TH_spliceE5 TH_spliceE5.hs  -v0
 -XTemplateHaskell -package template-haskell -dynamic-too
 <command line>: With -dynamic-too, must give -dyno iff giving -o
 }}}

 At the very least, we need to document this very clearly - I didn't see it
 mentioned in the release notes.  But I don't think that's enough: it
 should just work, as @goldfire says.

 Perhaps `TemplateHaskell` should imply `-dynamic-too`?  But what if you
 only have `TemplateHaskell` in a few modules of your program?  We can't go
 back to the beginning and recompile.

 Presumably Cabal doesn't have this problem because it always uses
 `-dynamic-too` now.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8180#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list