summaryrefslogtreecommitdiff
path: root/compiler/hsSyn/HsPat.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2016-03-16 14:30:00 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2016-03-17 10:07:22 -0400
commitb5565f1a79fd24fc45a6f1a58821a317852d4b89 (patch)
tree1b309bdfa7d842635e731151286c651343f2a783 /compiler/hsSyn/HsPat.hs
parent46f9a476e17714e27d893b491cc0dcf68c745249 (diff)
downloadhaskell-b5565f1a79fd24fc45a6f1a58821a317852d4b89.tar.gz
Fix #11711.
There were two bugs here, both simple: we need to filter out covars before calling isMetaTyVar in the solver, and TcPat had a tcSubType the wrong way round. test case: dependent/should_compile/T11711
Diffstat (limited to 'compiler/hsSyn/HsPat.hs')
-rw-r--r--compiler/hsSyn/HsPat.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/hsSyn/HsPat.hs b/compiler/hsSyn/HsPat.hs
index 36c4fafc8f..e01c6b9d07 100644
--- a/compiler/hsSyn/HsPat.hs
+++ b/compiler/hsSyn/HsPat.hs
@@ -419,9 +419,11 @@ pprPat (TuplePat pats bx _) = tupleParens (boxityTupleSort bx) (pprWithCommas
pprPat (ConPatIn con details) = pprUserCon (unLoc con) details
pprPat (ConPatOut { pat_con = con, pat_tvs = tvs, pat_dicts = dicts,
pat_binds = binds, pat_args = details })
- = getPprStyle $ \ sty -> -- Tiresome; in TcBinds.tcRhs we print out a
- if debugStyle sty then -- typechecked Pat in an error message,
- -- and we want to make sure it prints nicely
+ = sdocWithDynFlags $ \dflags ->
+ -- Tiresome; in TcBinds.tcRhs we print out a
+ -- typechecked Pat in an error message,
+ -- and we want to make sure it prints nicely
+ if gopt Opt_PrintTypecheckerElaboration dflags then
ppr con
<> braces (sep [ hsep (map pprPatBndr (tvs ++ dicts))
, ppr binds])