[GHC] #12034: Template Haskell + hs-boot = Not in scope during type checking, but it passed the renamer

GHC ghc-devs at haskell.org
Sun May 15 03:52:15 UTC 2016


#12034: Template Haskell + hs-boot = Not in scope during type checking, but it
passed the renamer
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  low               |            Milestone:
       Component:  Template Haskell  |              Version:  8.0.1-rc2
      Resolution:                    |             Keywords:  backpack hs-
                                     |  boot
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 ezyang):

 Here is a restriction for hs-boot files and TH which might solve this
 problem: all TYPEs in the hs-boot file (values can wait) must be defined
 in the section of the file PRIOR to the first Template Haskell splice.
 This ensures we have a consistent environment for knot-tying, and also is
 an obvious place to check for missing types #12063 or type synonym loops
 #12042.

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


More information about the ghc-tickets mailing list