
#9209: Template haskell panic -------------------------------------+------------------------------------- Reporter: tulcod | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by goldfire): Instead of implementing spliced declarations in more contexts, I'm just going to fix the panic and turn it into a sensible error message. In contrast to Simon's comment:2, not all the heavy lifting is done. To implement declaration splices in other contexts, it will be necessary to make rather drastic changes to the relevant AST nodes: we would need, say, an `HsLocalBinds` now to store declarations in the order they were written, so we can use declaration splices to break up mutually recursive blocks, as we do at top level. The same would have to be done for classes and instances. This would add up to quite a lot of code change, for a feature no one has actually requested. (I'm taking the original report to be a complaint about a panic, not a complaint about a missing splice feature.) All of this ''is'' possible, but it's more work than I wish to invest at the moment. Expect a patch soon fixing the error message, but if you want non-top-level declaration splices, please create a new ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9209#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler