summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2018-11-01 15:37:58 -0400
committerRichard Eisenberg <rae@cs.brynmawr.edu>2018-11-01 17:34:47 -0400
commit74ed9c1c1b26971133c7166663b9c966d2eaca08 (patch)
tree67e545f02474a8036a23262dd864573105f5e7d9 /compiler
parent255d2e323a8879a7296a5ab94e6cc49023e2c86e (diff)
downloadhaskell-74ed9c1c1b26971133c7166663b9c966d2eaca08.tar.gz
Actually fail in failIfEmitsConstraints
The function TcHsType.failIfEmitsConstraints says that it fails. It even does so in its name. But it didn't! It *reported* constraints but didn't fail. Now it does. This is important in tcHsClsInstType; see the comments therein. This was discovered while looking at #15797, but that ticket requires visible kind application to exhibit the bug; the test case will come with the patch for #12045.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/typecheck/TcHsType.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/typecheck/TcHsType.hs b/compiler/typecheck/TcHsType.hs
index 3706c236c6..07c3a27668 100644
--- a/compiler/typecheck/TcHsType.hs
+++ b/compiler/typecheck/TcHsType.hs
@@ -2871,7 +2871,7 @@ reportFloatingKvs tycon_name flav all_tvs bad_tvs
failIfEmitsConstraints :: TcM a -> TcM a
failIfEmitsConstraints thing_inside
= do { (res, lie) <- captureConstraints thing_inside
- ; reportAllUnsolved lie
+ ; checkNoErrs $ reportAllUnsolved lie
; return res
}