[GHC] #13587: addTopDecls fails with typed Template Haskell
GHC
ghc-devs at haskell.org
Thu Apr 20 14:39:55 UTC 2017
#13587: addTopDecls fails with typed Template Haskell
-------------------------------------+-------------------------------------
Reporter: tmcdonell | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Template Haskell | Version: 8.2.1-rc1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
My suspicion is that this is a result of the rather hacky way that we do
dependency analysis for typed splices (where we just add everything in
scope to the free variable set of the splice; see `Note [Free variables of
typed splices]` in `RnSplice`) coupled with the fact that we don't run
typed splices until type-checking (see `rnSpliceExpr`). This means that
the declaration generated by the splice isn't present in the free variable
set associated with the splice, causing us to fail during typechecking.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13587#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list