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

GHC cvs-ghc at haskell.org
Fri Nov 26 12:39:48 CET 2010


#4524: Template variable unbound in rewrite rule
-------------------------+--------------------------------------------------
    Reporter:  guest     |        Owner:                                
        Type:  bug       |       Status:  merge                         
    Priority:  normal    |    Milestone:                                
   Component:  Compiler  |      Version:  7.0.1                         
    Keywords:            |     Testcase:  typecheck/should_compile/T4524
   Blockedby:            |   Difficulty:                                
          Os:  Linux     |     Blocking:                                
Architecture:  x86       |      Failure:  Compile-time crash            
-------------------------+--------------------------------------------------
Changes (by simonpj):

  * status:  new => merge
  * testcase:  => typecheck/should_compile/T4524


Comment:

 Great. I see it.  Fixed by
 {{{
 Thu Nov 25 09:23:56 PST 2010  simonpj at microsoft.com
   * Substitution should just substitute, not optimise

   This was causing Trac #4524, by optimising
        (e |> co)  to   e
   on the LHS of a rule.  Result, the template variable
   'co' wasn't bound any more.

   Now that substition doesn't optimise, it seems sensible to call
   simpleOptExpr rather than substExpr when substituting in the
   RHS of rules.  Not a big deal either way.

     M ./compiler/coreSyn/CoreSubst.lhs -10 +14
 }}}
 Please merge.

 Simon

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


More information about the Glasgow-haskell-bugs mailing list