Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/3671e674757c8f82ec1f0ea9b7c1ed56340b55bc >--------------------------------------------------------------- commit 3671e674757c8f82ec1f0ea9b7c1ed56340b55bc Author: Simon Peyton Jones <simo...@microsoft.com> Date: Fri Jan 4 10:27:38 2013 +0000 Allow empty case expressions (and lambda-case) with -XEmptyCase The main changes are: * Parser accepts empty case alternatives * Renamer checks that -XEmptyCase is on in that case * (Typechecker is pretty much unchanged.) * Desugarer desugars empty case alternatives, esp: - Match.matchWrapper and Match.match now accept empty eqns - New function matchEmpty deals with the empty case - See Note [Empty case alternatives] in Match This patch contains most of the work, but it's a bit mixed up with a refactoring of MatchGroup that I did at the same time (next commit). compiler/deSugar/DsExpr.lhs | 13 +------- compiler/deSugar/DsUtils.lhs | 2 +- compiler/deSugar/Match.lhs | 55 ++++++++++++++++++++++++++++--------- compiler/deSugar/MatchCon.lhs | 3 +- compiler/deSugar/MatchLit.lhs | 2 +- compiler/main/DynFlags.hs | 4 ++- compiler/parser/Parser.y.pp | 2 + compiler/rename/RnBinds.lhs | 18 ++++++++++-- docs/users_guide/glasgow_exts.xml | 38 +++++++++++++++++++++++++ 9 files changed, 106 insertions(+), 31 deletions(-) Diff suppressed because of size. To see it, use: git show 3671e674757c8f82ec1f0ea9b7c1ed56340b55bc _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc