
#10382: Template Haskell (non-quasi) quotes should work with stage 1 compiler -------------------------------------+------------------------------------- Reporter: ezyang | Owner: ezyang Type: feature request | Status: new Priority: normal | Milestone: 7.12.1 Component: Template Haskell | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: Phab:D876 -------------------------------------+------------------------------------- Comment (by ekmett): The current situation: On one hand I have a number of packages that provide `TemplateHaskell` convenience functions for users, `lens` being the go-to example. But on the other hand, I have a bunch of folks who maintain releases for my packages on platforms where only a stage1 compiler is available, Joachim Breitner and the Debian folks used to maintain patches and versions of my code that removed large chunks of the libraries to build on those platforms. When i found out, I offered to support stage1 compilers myself more directly. This ensured a more uniform API, and that different distributions weren't crippling my code in different ways, making it so certain combinators or modules just weren't available on certain platforms. But then we ran into an issue, we needed to generate names that linked to the right places within our code. So we manually construct all of our names ourselves, using the cabal-supplied version number or package key when needed: https://github.com/ekmett/lens/blob/9a247b52ed20e578d9c843d8cc6dad5433a1c186... Then we just don't use the TemplateHaskell extension ourselves, despite linking against the `template-haskell` package and everything is good enough for us to limp along. I would love to eventually be able to drop this set of hoops, but I have few opinions on the best way to get there. That said, Edward's suggestion of making TemplateHaskell just bomb when you reach a splice site in stage1 rather than immediately would avoid introducing any new flags and sounds pretty simple. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10382#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler