summaryrefslogtreecommitdiff
path: root/compiler/GHC/HsToCore/Expr.hs
diff options
context:
space:
mode:
authorCale Gibbard <cgibbard@gmail.com>2020-06-30 10:46:49 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-07 08:34:46 -0400
commitfa9bb70a3fefef681cb0e80cc78977386c1dcf0a (patch)
tree09c9f9f42540f75b5098ed47a28a09bb07ee19a2 /compiler/GHC/HsToCore/Expr.hs
parent3907ee01e68b383fa30386d163decf203acedb19 (diff)
downloadhaskell-fa9bb70a3fefef681cb0e80cc78977386c1dcf0a.tar.gz
Add some tests for fail messages in do-expressions and monad-comprehensions.
Diffstat (limited to 'compiler/GHC/HsToCore/Expr.hs')
-rw-r--r--compiler/GHC/HsToCore/Expr.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs
index 2987e3e9f3..ffa4e9323f 100644
--- a/compiler/GHC/HsToCore/Expr.hs
+++ b/compiler/GHC/HsToCore/Expr.hs
@@ -988,7 +988,7 @@ dsDo ctx stmts
; var <- selectSimpleMatchVarL (xbstc_boundResultMult xbs) pat
; match <- matchSinglePatVar var (StmtCtxt ctx) pat
(xbstc_boundResultType xbs) (cantFailMatchResult body)
- ; match_code <- dsHandleMonadicFailure DoExpr pat match (xbstc_failOp xbs)
+ ; match_code <- dsHandleMonadicFailure ctx pat match (xbstc_failOp xbs)
; dsSyntaxExpr (xbstc_bindOp xbs) [rhs', Lam var match_code] }
go _ (ApplicativeStmt body_ty args mb_join) stmts
@@ -1009,7 +1009,7 @@ dsDo ctx stmts
= do { var <- selectSimpleMatchVarL Many pat
; match <- matchSinglePatVar var (StmtCtxt ctx) pat
body_ty (cantFailMatchResult body)
- ; match_code <- dsHandleMonadicFailure DoExpr pat match fail_op
+ ; match_code <- dsHandleMonadicFailure ctx pat match fail_op
; return (var:vs, match_code)
}