summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÖmer Sinan Ağacan <omeragacan@gmail.com>2017-03-11 16:33:54 +0300
committerÖmer Sinan Ağacan <omeragacan@gmail.com>2017-03-11 16:33:54 +0300
commit8d61a605e7d1f2490cbe26c465f87f8bafe0d4fc (patch)
treedb3cbf3238837a2a166a0edc39e164ed9a72c1b4
parent3ca252b1dde379d0ce1f18a34703a94084fb46d0 (diff)
downloadhaskell-8d61a605e7d1f2490cbe26c465f87f8bafe0d4fc.tar.gz
dsGRHSs: Remove unused pattern variables argument
-rw-r--r--compiler/deSugar/DsGRHSs.hs6
-rw-r--r--compiler/deSugar/Match.hs2
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/deSugar/DsGRHSs.hs b/compiler/deSugar/DsGRHSs.hs
index 0a66bd0bb8..e66461259d 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@.
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@.
-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 a4aa56e975..92f78bed33 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