summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail212.stderr
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2019-03-13 11:15:20 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-03-16 08:08:25 -0400
commit4927117cd6166a97455d788dbf7433c95441b57a (patch)
tree07a0e4b2277d0db641254f8b4c0c2fe3f33d588f /testsuite/tests/typecheck/should_fail/tcfail212.stderr
parent57201bebaeb15c5635ac5ea153b0141b55670199 (diff)
downloadhaskell-4927117cd6166a97455d788dbf7433c95441b57a.tar.gz
Improve error recovery in the typechecker
Issue #16418 showed that we were carrying on too eagerly after a bogus type signature was identified (a bad telescope in fact), leading to a subsequent crash. This led me in to a maze of twisty little passages in the typechecker's error recovery, and I ended up doing some refactoring in TcRnMonad. Some specfifics * TcRnMonad.try_m is now called attemptM. * I switched the order of the result pair in tryTc, to make it consistent with other similar functions. * The actual exception used in the Tc monad is irrelevant so, to avoid polluting type signatures, I made tcTryM, a simple wrapper around tryM, and used it. The more important changes are in * TcSimplify.captureTopConstraints, where we should have been calling simplifyTop rather than reportUnsolved, so that levity defaulting takes place properly. * TcUnify.emitResidualTvConstraint, where we need to set the correct status for a new implication constraint. (Previously we ended up with an Insoluble constraint wrapped in an Unsolved implication, which meant that insolubleWC gave the wrong answer.
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail212.stderr')
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail212.stderr22
1 files changed, 0 insertions, 22 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail212.stderr b/testsuite/tests/typecheck/should_fail/tcfail212.stderr
index ad5985e63a..011a3772ef 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail212.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail212.stderr
@@ -16,25 +16,3 @@ tcfail212.hs:13:7: error:
tcfail212.hs:13:13: error:
• Expecting a lifted type, but ‘Int#’ is unlifted
• In the type signature: g :: (Int#, Int#)
-
-tcfail212.hs:14:6: error:
- • Couldn't match a lifted type with an unlifted type
- When matching types
- a :: *
- Int# :: TYPE 'IntRep
- • In the expression: 1#
- In the expression: (1#, 2#)
- In an equation for ‘g’: g = (1#, 2#)
- • Relevant bindings include
- g :: (a, b) (bound at tcfail212.hs:14:1)
-
-tcfail212.hs:14:10: error:
- • Couldn't match a lifted type with an unlifted type
- When matching types
- b :: *
- Int# :: TYPE 'IntRep
- • In the expression: 2#
- In the expression: (1#, 2#)
- In an equation for ‘g’: g = (1#, 2#)
- • Relevant bindings include
- g :: (a, b) (bound at tcfail212.hs:14:1)