
#8519: Make -XTemplateHaskell an error in a stage-1 compiler ------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- If you use the language extension `-XTemplateHaskell` in a stage-1 compiler, it's guaranteed not to work. This patch makes it an error to do so. The error is suppressed in `MkDepend` mode (i.e. `ghc -M`) because that ''does'' work; the TH flag is not consulted. Moreover it is used by GHC's build system itself: for some reason we use the stage-1 compiler to do build the `.depend` files for DPH, even though DPH is only built with stage2. This is an infelicity, but Ian writes "It's due to the [wiki:Building/Architecture/Idiom/PhaseOrdering#GHCsphases build system phases]: stage2 doesn't exist during the phase in which DPH is configured. Changing it to use stage 2 would probably mean adding another phase for things that need to be configured by stage 2. This might mean slower builds due to loss of parallelism, I'm not sure. This change isn't mission critical; it could be a warning instead. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8519 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler