[GHC] #4524: Template variable unbound in rewrite rule

GHC cvs-ghc at haskell.org
Wed Nov 24 06:52:18 CET 2010


#4524: Template variable unbound in rewrite rule
---------------------------------+------------------------------------------
    Reporter:  guest             |       Owner:                         
        Type:  bug               |      Status:  new                    
    Priority:  normal            |   Component:  Compiler (Type checker)
     Version:  7.0.1             |    Keywords:                         
    Testcase:                    |   Blockedby:                         
          Os:  Unknown/Multiple  |    Blocking:                         
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown           
---------------------------------+------------------------------------------
 I was trying to compile the latest darcs source (darcs get --lazy
 http://darcs.net) using ghc7.  I had to modify darcs.cabal to add
 !NoMonoLocalBinds to 3 places (just search for extensions, and add it to
 the END of the lists).

 When I do a build I get this:
 {{{
 [ 65 of 154] Compiling Darcs.Patch.V1.Commute (
 src/Darcs/Patch/V1/Commute.lhs, dist/build/Darcs/Patch/V1/Commute.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.0.1 for i386-unknown-linux):
         Template variable unbound in rewrite rule
     sg_s2vkQ{tv} [co]
     [x{tv a2uFt} [sk], y{tv a2uFu} [sk], sg_s2vkQ{tv} [co],
      sc_s2vkR{v} [lid], sc_s2vkS{v} [lid]]
     [x{tv X2uJc} [sk], y{tv X2uJe} [sk], sg_s2vkQ{tv} [co],
      sc_s2vkR{v} [lid], sc_s2vkS{v} [lid]]
     [TYPE y{tv a2uFu} [sk], TYPE y{tv a2uFu} [sk],
      TYPE x{tv a2uFt} [sk], TYPE x{tv a2uFt} [sk],
      TYPE x{tv a2uFt} [sk], sc_s2vkS{v} [lid], sc_s2vkR{v} [lid],
      darcs-2.5:Darcs.Witnesses.Ordered.NilRL{v ruI5} [gid[DataCon]]
        @ darcs-2.5:Darcs.Patch.V1.Core.Patch{tc r1EYF}
        @ x{tv a2uFt} [sk]
        @ x{tv a2uFt} [sk]
        @ x{tv a2uFt} [sk]]
     [TYPE y{tv a2uFu} [sk], TYPE y{tv a2uFu} [sk],
      TYPE x{tv a2uFt} [sk], TYPE x{tv a2uFt} [sk],
      TYPE x{tv a2uFt} [sk], wild_s2vhT{v} [lid], sc_s2vke{v} [lid],
      darcs-2.5:Darcs.Witnesses.Ordered.NilRL{v ruI5} [gid[DataCon]]
        @ darcs-2.5:Darcs.Patch.V1.Core.Patch{tc r1EYF}
        @ x{tv a2uFt} [sk]
        @ x{tv a2uFt} [sk]
        @ x{tv a2uFt} [sk]]

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

 As an additional data point, this module builds correctly without
 !NoMonoLocalBinds.  The reason I was adding !NoMonoLocalBinds to the
 .cabal file is because I can't use `#if __GLASGOW_HASKELL >= 700` to
 conditionally add in this language flag.  The reason is because ghc6 will
 not correctly understand the language flag appearing inside a CPP
 #if/#endif block and I want this code to compile on ghc6 and 7.

 Please let me know if I can provide additional information to help
 reproduce this bug.  My email address is dagitj on gmail, also on CC of
 this ticket.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4524>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list