summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-06-18 14:12:54 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2015-06-18 14:15:59 +0100
commit02bac0254182def11029e2f7373ba8d2ba9ebe44 (patch)
tree9b254a1af59a751f28af395b98b52b51b0d61a39 /testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
parent4a7a6c3ac869f74dfe1c9af09c48faadc0ecba16 (diff)
downloadhaskell-02bac0254182def11029e2f7373ba8d2ba9ebe44.tar.gz
Remove some horrible munging of origins for Coercible
I just didn't think it was buying enough for all the cruft it caused. We can put some back if people start complaining about poor error messages. I forget quite how I tripped over this but I got sucked in. * Lots of tidying up in TcErrors * Rename pprArisingAt to pprCtLoc, by analogy with pprCtOrigin * Remove CoercibleOrigin data constructor from CtOrigin * Make relevantBindings return a Ct with a zonked and tidied CtOrigin * Add to TcRnTypes ctOrigin :: Ct -> CtOrigin ctEvOrigin :: CtEvidence -> CtOrigin setCtLoc :: Ct -> CtLoc -> Ct
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr')
-rw-r--r--testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr20
1 files changed, 7 insertions, 13 deletions
diff --git a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
index 434d5e34a7..e41d8c1b10 100644
--- a/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
+++ b/testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
@@ -1,12 +1,14 @@
TcCoercibleFail.hs:11:8: error:
Couldn't match representation of type ‘Int’ with that of ‘()’
+ arising from a use of ‘coerce’
In the expression: coerce
In the expression: coerce $ one :: ()
In an equation for ‘foo1’: foo1 = coerce $ one :: ()
TcCoercibleFail.hs:14:8: error:
Couldn't match representation of type ‘m Int’ with that of ‘m Age’
+ arising from a use of ‘coerce’
NB: We cannot know what roles the parameters to ‘m’ have;
we must assume that the role is nominal
Relevant bindings include
@@ -16,18 +18,14 @@ TcCoercibleFail.hs:14:8: error:
In an equation for ‘foo2’: foo2 = coerce $ (return one :: m Int)
TcCoercibleFail.hs:16:8: error:
- Couldn't match type ‘Int’ with ‘Age’
- arising from trying to show that the representations of
- ‘Map Int ()’ and
- ‘Map Age ()’ are the same
- Relevant role signatures: type role Map nominal representational
+ Couldn't match type ‘Int’ with ‘Age’ arising from a use of ‘coerce’
In the expression: coerce
In the expression: coerce $ Map one () :: Map Age ()
In an equation for ‘foo3’: foo3 = coerce $ Map one () :: Map Age ()
TcCoercibleFail.hs:18:8: error:
Couldn't match representation of type ‘Int’ with that of ‘Down Int’
- Relevant role signatures: type role Down representational
+ arising from a use of ‘coerce’
The data constructor ‘Down’ of newtype ‘Down’ is not in scope
In the expression: coerce
In the expression: coerce $ one :: Down Int
@@ -35,13 +33,14 @@ TcCoercibleFail.hs:18:8: error:
TcCoercibleFail.hs:21:8: error:
Couldn't match representation of type ‘Void’ with that of ‘()’
+ arising from a use of ‘coerce’
In the expression: coerce :: Void -> ()
In an equation for ‘foo5’: foo5 = coerce :: Void -> ()
TcCoercibleFail.hs:24:9: error:
Couldn't match representation of type ‘VoidBad ()’
with that of ‘()’
- Relevant role signatures: type role VoidBad phantom
+ arising from a use of ‘coerce’
In the expression: coerce :: (VoidBad ()) -> ()
In an equation for ‘foo5'’: foo5' = coerce :: (VoidBad ()) -> ()
@@ -60,11 +59,6 @@ TcCoercibleFail.hs:29:8: error:
Couldn't match representation of type ‘Either
Int (Fix (Either Int))’
with that of ‘()’
- arising from trying to show that the representations of
- ‘Fix (Either Int)’ and
- ‘()’ are the same
- Relevant role signatures:
- type role Either representational representational
- type role Fix nominal
+ arising from a use of ‘coerce’
In the expression: coerce :: Fix (Either Int) -> ()
In an equation for ‘foo7’: foo7 = coerce :: Fix (Either Int) -> ()