[GHC] #8025: -fno-code and Template Haskell are incompatible

GHC ghc-devs at haskell.org
Wed Aug 23 23:54:34 UTC 2017


#8025: -fno-code and Template Haskell are incompatible
-------------------------------------+-------------------------------------
        Reporter:  mojojojo          |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Compiler (Type    |              Version:  7.6.3
  checker)                           |
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:  x86
 Type of failure:  Incorrect         |            Test Case:
  warning at compile-time            |
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D3441
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by duog):

 I agree that having the ability to override the current behaviour would be
 useful, but I don't think that overloading -fobject-code to do it is
 right.

 I would suggest that we need an "-fno-code-auto" flag.

 Currently, when we are deciding which modules to codegen in
 GhcMake.enableCodegenForTH, we take all transitive dependencies of modules
 that use -XTemplateHaskell.

 We could instead take all transitive dependencies (where those
 dependencies don't disable -fno-code-auto) of modules that use
 -XTemplateHaskell.

 I think it would make sense to disable -fno-code-auto by default if we
 improved the error message to suggest it be enabled. One could just add
 {-# OPTIONS_GHC -fno-code-auto #-} to the modules that need to be
 codegenned.

 Separately, a flag -fno-code-target={default,interpreted,asm(?),llvm(?)}
 should perhaps be added to determine the method of codegen. This would
 enable us to use interpreted by default, again provided that errors from,
 for example, unboxed tuples, suggested the user change it.

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


More information about the ghc-tickets mailing list