[GHC] #13587: addTopDecls fails with typed Template Haskell

GHC ghc-devs at haskell.org
Thu Apr 20 03:32:34 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 erikd):

 I've just confirmed this in git HEAD (21c35bda8e). Even pulling `sin'` and
 `cos'` out to the top level and giving them explicit type signatures
 doesn't help.

 {{{
   • GHC internal error: ‘cos_a4gy’ is not in scope during type checking,
 but it
     passed the  renamer
     tcl_env of environment:
            [r34Z :-> Identifier[sin'::Double -> Double, TopLevelLet],
             r372 :-> Identifier[cos'::Double -> Double, TopLevelLet],
             r373 :-> Identifier[main::IO (), TopLevelLet]]
   • In the expression: cos_a4gy
     In the result of the splice:
       $importDoubleToDouble "cos"
     To see what the splice expanded to, use -ddump-splices
     In the Template Haskell splice $$(importDoubleToDouble "cos")
 }}}

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


More information about the ghc-tickets mailing list