#5183: HEAD: panic addTickHsCmd for T3822
--------------------------------+-------------------------------------------
  Reporter:  daniel.is.fischer  |          Owner:  simonpj         
      Type:  bug                |         Status:  closed          
  Priority:  normal             |      Milestone:                  
 Component:  Compiler           |        Version:  7.1             
Resolution:  fixed              |       Keywords:                  
  Testcase:                     |      Blockedby:                  
Difficulty:                     |             Os:  Unknown/Multiple
  Blocking:                     |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown       |  
--------------------------------+-------------------------------------------
Changes (by simonpj):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Fixed by
 {{{
 commit 13f959e89c4a23cb2337fb3157f3d7a679debf99
 Author: Simon Peyton Jones <[email protected]>
 Date:   Mon May 9 16:44:30 2011 +0100

     Fix the desugaring of guards in arrow syntax

     This was making T3822 fail, which it has apparently been doing
     for some time (ie in GHC 7, 6.12, 6.10)!

 >---------------------------------------------------------------

  compiler/deSugar/Coverage.lhs |    9 ++++++---
  1 files changed, 6 insertions(+), 3 deletions(-)

 diff --git a/compiler/deSugar/Coverage.lhs b/compiler/deSugar/Coverage.lhs
 index 8071da7..37cbc2d 100644
 --- a/compiler/deSugar/Coverage.lhs
 +++ b/compiler/deSugar/Coverage.lhs
 @@ -608,9 +608,12 @@ addTickCmdGRHSs (GRHSs guarded local_binds) = do
      binders = collectLocalBinders local_binds

  addTickCmdGRHS :: GRHS Id -> TM (GRHS Id) -addTickCmdGRHS (GRHS stmts
 cmd) = do
 -  (stmts',expr') <- addTickLCmdStmts' stmts (addTickLHsCmd cmd)
 -  return $ GRHS stmts' expr'
 +-- The *guards* are *not* Cmds, although the body is
 +-- C.f. addTickGRHS for the BinBox stuff addTickCmdGRHS (GRHS stmts
 +cmd)
 +  = do { (stmts',expr') <- addTickLStmts' (Just $ BinBox $ GuardBinBox)
 +                                   stmts (addTickLHsCmd cmd)
 +       ; return $ GRHS stmts' expr' }

  addTickLCmdStmts :: [LStmt Id] -> TM [LStmt Id]  addTickLCmdStmts stmts =
 do
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to