#6067: regression: cgrun051(ghci) failing in HEAD
---------------------------------+------------------------------------------
    Reporter:  simonmar          |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  highest           |   Milestone:  7.6.1           
   Component:  Compiler          |     Version:  7.5             
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj@…):

 commit ac230c5ef652e27f61d954281ae6a3195e1f9970
 {{{
 Author: Simon Peyton Jones <[email protected]>
 Date:   Wed May 2 15:44:14 2012 +0100

     Allow cases with empty alterantives

     This patch allows, for the first time, case expressions with an empty
     list of alternatives. Max suggested the idea, and Trac #6067 showed
     that it is really quite important.

     So I've implemented the idea, fixing #6067. Main changes

      * See Note [Empty case alternatives] in CoreSyn

      * Various foldr1's become foldrs

      * IfaceCase does not record the type of the alternatives.
        I added IfaceECase for empty-alternative cases.

      * Core Lint does not complain about empty cases

      * MkCore.castBottomExpr constructs an empty-alternative case
        expression   (case e of ty {})

      * CoreToStg converts '(case e of {})' to just 'e'

  compiler/coreSyn/CoreArity.lhs     |   10 +++-
  compiler/coreSyn/CoreFVs.lhs       |    2 +-
  compiler/coreSyn/CoreLint.lhs      |    8 ---
  compiler/coreSyn/CoreSyn.lhs       |   53 ++++++++++++++++++++-
  compiler/coreSyn/CoreUnfold.lhs    |    4 +-
  compiler/coreSyn/MkCore.lhs        |   12 ++++-
  compiler/iface/BinIface.hs         |    7 +++
  compiler/iface/IfaceSyn.lhs        |   14 +++++-
  compiler/iface/MkIface.lhs         |    4 +-
  compiler/iface/TcIface.lhs         |    6 ++
  compiler/simplCore/OccurAnal.lhs   |    2 +-
  compiler/simplCore/SimplCore.lhs   |   10 ++--
  compiler/simplCore/SimplUtils.lhs  |   56 +++++++++++-----------
  compiler/simplCore/Simplify.lhs    |   93
 ++++++++++++++++++------------------
  compiler/specialise/SpecConstr.lhs |    4 +-
  compiler/specialise/Specialise.lhs |    8 ++--
  compiler/stgSyn/CoreToStg.lhs      |   12 +++++
  compiler/stranal/DmdAnal.lhs       |    2 +-
  18 files changed, 201 insertions(+), 106 deletions(-)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6067#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