[commit: ghc] ghc-8.6: Small refactor in desugar of pattern matching (42c51e2)
git at git.haskell.org
git at git.haskell.org
Thu Aug 2 02:42:40 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.6
Link : http://ghc.haskell.org/trac/ghc/changeset/42c51e2f39ce829fa4a380b604c9a7f5ea71d28d/ghc
>---------------------------------------------------------------
commit 42c51e2f39ce829fa4a380b604c9a7f5ea71d28d
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
(cherry picked from commit 45cfe6514afb47c26883687e25ff7eb1e40c5a52)
>---------------------------------------------------------------
42c51e2f39ce829fa4a380b604c9a7f5ea71d28d
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 42c51e2f39ce829fa4a380b604c9a7f5ea71d28d
More information about the ghc-commits
mailing list