[commit: ghc] master: Small refactor in desugar of pattern matching (45cfe65)

git at git.haskell.org git at git.haskell.org
Fri Jul 27 09:07:02 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/45cfe6514afb47c26883687e25ff7eb1e40c5a52/ghc

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

commit 45cfe6514afb47c26883687e25ff7eb1e40c5a52
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Jul 27 09:17:20 2018 +0100

    Small refactor in desugar of pattern matching
    
    In reviewing Phab:D4968 for Trac #15385 I saw a small
    but simple refactor to avoid unnecessary work in the
    desugarer.
    
    This patch just arranges to call
       matchSinglePatVar v ...
    rather than
       matchSinglePat (Var v) ...
    
    The more specialised function already existed, as
       match_single_pat_var
    
    I also added more comments about decideBangHood


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

45cfe6514afb47c26883687e25ff7eb1e40c5a52
 compiler/deSugar/DsExpr.hs     |  2 +-
 compiler/deSugar/DsListComp.hs |  2 +-
 compiler/deSugar/DsMonad.hs    |  3 +++
 compiler/deSugar/DsUtils.hs    | 46 +++++++++++++++++++++++++++++++++---------
 compiler/deSugar/Match.hs      | 21 ++++++++++---------
 5 files changed, 54 insertions(+), 20 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 45cfe6514afb47c26883687e25ff7eb1e40c5a52


More information about the ghc-commits mailing list