[GHC] #9160: Panic: Template variable unbound in rewrite rule

GHC ghc-devs at haskell.org
Thu Jun 12 16:23:41 UTC 2014


#9160: Panic: Template variable unbound in rewrite rule
---------------------------------------+----------------------------------
        Reporter:  mietek              |            Owner:
            Type:  bug                 |           Status:  new
        Priority:  normal              |        Milestone:
       Component:  Compiler            |          Version:  7.8.2
      Resolution:                      |         Keywords:
Operating System:  Unknown/Multiple    |     Architecture:  x86_64 (amd64)
 Type of failure:  Compile-time crash  |       Difficulty:  Unknown
       Test Case:                      |       Blocked By:
        Blocking:                      |  Related Tickets:  #4524
---------------------------------------+----------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"b637585dcbfc1ba53aa49bcb9b730cd08fea4b59/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="b637585dcbfc1ba53aa49bcb9b730cd08fea4b59"
 Fix elemLocalRdrEnv (Trac #9160)

 This was pretty obscure.  elemLocalRdrEnv was utterly wrong (replied
 False when it should reply True) when given an Exact Name. That
 doesn't happen often, but it does happen in the result of a TH splice.
 The result was that an associated type didn't get a type variable that
 lined up with its parent class (elemLocalRdrEnv is used in
 RnTypes.bindHsTyVars), and that messed up the singletons package.

 I've made a completely different test case to show up the bug:
 indexed_types/should_fail/T9160

 I also refactored RdrName.LocalRdrEnv to be a record with named
 fields, which makes the code more robust and easy to understand.
 }}}

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


More information about the ghc-tickets mailing list