• Simon Peyton Jones's avatar
    Allow empty case expressions (and lambda-case) with -XEmptyCase · 3671e674
    Simon Peyton Jones authored
    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).
RnBinds.lhs 34.7 KB