summaryrefslogtreecommitdiff
path: root/compiler/GHC/HsToCore/Match.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/HsToCore/Match.hs')
-rw-r--r--compiler/GHC/HsToCore/Match.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/HsToCore/Match.hs b/compiler/GHC/HsToCore/Match.hs
index 0cf83d378c..56fffd89a2 100644
--- a/compiler/GHC/HsToCore/Match.hs
+++ b/compiler/GHC/HsToCore/Match.hs
@@ -285,9 +285,9 @@ matchCoercion (var :| vars) ty (eqns@(eqn1 :| _))
; var' <- newUniqueId var (idMult var) pat_ty'
; match_result <- match (var':vars) ty $ NEL.toList $
decomposeFirstPat getCoPat <$> eqns
- ; core_wrap <- dsHsWrapper co
- ; let bind = NonRec var' (core_wrap (Var var))
- ; return (mkCoLetMatchResult bind match_result) }
+ ; dsHsWrapper co $ \core_wrap -> do
+ { let bind = NonRec var' (core_wrap (Var var))
+ ; return (mkCoLetMatchResult bind match_result) } }
matchView :: NonEmpty MatchId -> Type -> NonEmpty EquationInfo -> DsM (MatchResult CoreExpr)
-- Apply the view function to the match variable and then match that