summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/Gen/Pat.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/Tc/Gen/Pat.hs')
-rw-r--r--compiler/GHC/Tc/Gen/Pat.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Tc/Gen/Pat.hs b/compiler/GHC/Tc/Gen/Pat.hs
index 57a2288223..b66f54c6ef 100644
--- a/compiler/GHC/Tc/Gen/Pat.hs
+++ b/compiler/GHC/Tc/Gen/Pat.hs
@@ -402,7 +402,8 @@ tc_pat pat_ty penv ps_pat thing_inside = case ps_pat of
; return (BangPat x pat', res) }
OrPat _ pats -> do -- or-patterns with variables are rejected later, after zonking
- { (pats', res) <- tc_lpats (map (const pat_ty) pats) penv pats thing_inside
+ { (pats', (res, pat_ct)) <- tc_lpats (map (const pat_ty) pats) penv pats (captureConstraints thing_inside)
+ ; emitConstraints pat_ct
; pat_ty <- expTypeToType (scaledThing pat_ty)
; return (OrPat pat_ty pats', res) }