[commit: ghc] master: dsGRHSs: Remove unused pattern variables argument (8d61a60)
git at git.haskell.org
git at git.haskell.org
Sat Mar 11 13:34:23 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/8d61a605e7d1f2490cbe26c465f87f8bafe0d4fc/ghc
>---------------------------------------------------------------
commit 8d61a605e7d1f2490cbe26c465f87f8bafe0d4fc
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date: Sat Mar 11 16:33:54 2017 +0300
dsGRHSs: Remove unused pattern variables argument
>---------------------------------------------------------------
8d61a605e7d1f2490cbe26c465f87f8bafe0d4fc
compiler/deSugar/DsGRHSs.hs | 6 +++---
compiler/deSugar/Match.hs | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/compiler/deSugar/DsGRHSs.hs b/compiler/deSugar/DsGRHSs.hs
index 0a66bd0..e664612 100644
--- a/compiler/deSugar/DsGRHSs.hs
+++ b/compiler/deSugar/DsGRHSs.hs
@@ -47,17 +47,17 @@ necessary. The type argument gives the type of the @ei at .
dsGuarded :: GRHSs Id (LHsExpr Id) -> Type -> DsM CoreExpr
dsGuarded grhss rhs_ty = do
- match_result <- dsGRHSs PatBindRhs [] grhss rhs_ty
+ match_result <- dsGRHSs PatBindRhs grhss rhs_ty
error_expr <- mkErrorAppDs nON_EXHAUSTIVE_GUARDS_ERROR_ID rhs_ty empty
extractMatchResult match_result error_expr
-- In contrast, @dsGRHSs@ produces a @MatchResult at .
-dsGRHSs :: HsMatchContext Name -> [Pat Id] -- These are to build a MatchContext from
+dsGRHSs :: HsMatchContext Name
-> GRHSs Id (LHsExpr Id) -- Guarded RHSs
-> Type -- Type of RHS
-> DsM MatchResult
-dsGRHSs hs_ctx _ (GRHSs grhss binds) rhs_ty
+dsGRHSs hs_ctx (GRHSs grhss binds) rhs_ty
= ASSERT( notNull grhss )
do { match_results <- mapM (dsGRHS hs_ctx rhs_ty) grhss
; let match_result1 = foldr1 combineMatchResults match_results
diff --git a/compiler/deSugar/Match.hs b/compiler/deSugar/Match.hs
index a4aa56e..92f78be 100644
--- a/compiler/deSugar/Match.hs
+++ b/compiler/deSugar/Match.hs
@@ -755,7 +755,7 @@ matchWrapper ctxt mb_scr (MG { mg_alts = L _ matches
; tm_cs <- genCaseTmCs2 mb_scr upats vars
; match_result <- addDictsDs dicts $ -- See Note [Type and Term Equality Propagation]
addTmCsDs tm_cs $ -- See Note [Type and Term Equality Propagation]
- dsGRHSs ctxt upats grhss rhs_ty
+ dsGRHSs ctxt grhss rhs_ty
; return (EqnInfo { eqn_pats = upats, eqn_rhs = match_result}) }
handleWarnings = if isGenerated origin
More information about the ghc-commits
mailing list