summaryrefslogtreecommitdiff
path: root/compiler/typecheck/TcRnDriver.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/typecheck/TcRnDriver.hs')
-rw-r--r--compiler/typecheck/TcRnDriver.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/typecheck/TcRnDriver.hs b/compiler/typecheck/TcRnDriver.hs
index 36ec8dcd2e..0388f0cef7 100644
--- a/compiler/typecheck/TcRnDriver.hs
+++ b/compiler/typecheck/TcRnDriver.hs
@@ -2427,12 +2427,13 @@ tcRnType hsc_env normalise rdr_type
-- It can have any rank or kind
-- First bring into scope any wildcards
; traceTc "tcRnType" (vcat [ppr wcs, ppr rn_type])
- ; ((ty, kind), lie) <-
- captureConstraints $
+ ; (ty, kind) <- pushTcLevelM_ $
+ -- must push level to satisfy level precondition of
+ -- kindGeneralize, below
+ solveEqualities $
tcWildCardBinders wcs $ \ wcs' ->
do { emitWildCardHoleConstraints wcs'
; tcLHsTypeUnsaturated rn_type }
- ; _ <- checkNoErrs (simplifyInteractive lie)
-- Do kind generalisation; see Note [Kind-generalise in tcRnType]
; kind <- zonkTcType kind