summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-06-26 16:00:19 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2015-06-26 17:53:33 +0100
commitceb3c8448dfba23aa98a710f846304158c1c584b (patch)
tree18f397939bdf200877cc3189ddd15dfb3d30e9a8 /testsuite/tests/typecheck/should_fail
parenta64a26f0a1a864522937caaf68687baf1a5f9bcb (diff)
downloadhaskell-ceb3c8448dfba23aa98a710f846304158c1c584b.tar.gz
Improve error message for Typeable k (T k)
GHC can't yest build a TypeRep for a type involving kind variables. (We await kinds = types for that.) But the error message was terrible, as fixing #10524 reminded me. This improves it a lot.
Diffstat (limited to 'testsuite/tests/typecheck/should_fail')
-rw-r--r--testsuite/tests/typecheck/should_fail/T2846b.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/T6022.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/T9858a.stderr28
-rw-r--r--testsuite/tests/typecheck/should_fail/T9858b.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T9999.stderr7
-rw-r--r--testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail046.stderr6
7 files changed, 35 insertions, 36 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T2846b.stderr b/testsuite/tests/typecheck/should_fail/T2846b.stderr
index 3008346ddd..0323283477 100644
--- a/testsuite/tests/typecheck/should_fail/T2846b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2846b.stderr
@@ -1,7 +1,6 @@
-
-T2846b.hs:5:5:
- No instance for (Show (Num a0 => a0))
- (maybe you haven't applied a function to enough arguments?)
- arising from a use of ‘show’
- In the expression: show ([1, 2, 3] :: [Num a => a])
- In an equation for ‘f’: f = show ([1, 2, 3] :: [Num a => a])
+
+T2846b.hs:5:5: error:
+ No instance for (Show (Num a0 => a0)) arising from a use of ‘show’
+ (maybe you haven't applied a function to enough arguments?)
+ In the expression: show ([1, 2, 3] :: [Num a => a])
+ In an equation for ‘f’: f = show ([1, 2, 3] :: [Num a => a])
diff --git a/testsuite/tests/typecheck/should_fail/T6022.stderr b/testsuite/tests/typecheck/should_fail/T6022.stderr
index 7d12b8f358..a85c6289da 100644
--- a/testsuite/tests/typecheck/should_fail/T6022.stderr
+++ b/testsuite/tests/typecheck/should_fail/T6022.stderr
@@ -1,7 +1,6 @@
-
-T6022.hs:3:9: error:
- No instance for (Eq ([a] -> a))
- (maybe you haven't applied a function to enough arguments?)
- arising from a use of ‘==’
- In the expression: x == head
- In an equation for ‘f’: f x = x == head
+
+T6022.hs:3:9: error:
+ No instance for (Eq ([a] -> a)) arising from a use of ‘==’
+ (maybe you haven't applied a function to enough arguments?)
+ In the expression: x == head
+ In an equation for ‘f’: f x = x == head
diff --git a/testsuite/tests/typecheck/should_fail/T9858a.stderr b/testsuite/tests/typecheck/should_fail/T9858a.stderr
index 61c62eaeec..a42339ed78 100644
--- a/testsuite/tests/typecheck/should_fail/T9858a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9858a.stderr
@@ -1,14 +1,14 @@
-
-T9858a.hs:28:18: error:
- No instance for (Typeable
- ((() :: Constraint, () :: Constraint) => ()))
- (maybe you haven't applied a function to enough arguments?)
- arising from a use of ‘cast’
- In the expression: cast e
- In the expression: case cast e of { Just e' -> ecast e' }
- In an equation for ‘supercast’:
- supercast
- = case cast e of { Just e' -> ecast e' }
- where
- e = Refl
- e :: E PX PX
+
+T9858a.hs:28:18: error:
+ No instance for (Typeable
+ ((() :: Constraint, () :: Constraint) => ()))
+ arising from a use of ‘cast’
+ (maybe you haven't applied a function to enough arguments?)
+ In the expression: cast e
+ In the expression: case cast e of { Just e' -> ecast e' }
+ In an equation for ‘supercast’:
+ supercast
+ = case cast e of { Just e' -> ecast e' }
+ where
+ e = Refl
+ e :: E PX PX
diff --git a/testsuite/tests/typecheck/should_fail/T9858b.stderr b/testsuite/tests/typecheck/should_fail/T9858b.stderr
index b57098e8b4..656ff53c95 100644
--- a/testsuite/tests/typecheck/should_fail/T9858b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9858b.stderr
@@ -1,8 +1,8 @@
T9858b.hs:7:8: error:
No instance for (Typeable (Eq Int => Int))
- (maybe you haven't applied a function to enough arguments?)
arising from a use of ‘typeRep’
+ (maybe you haven't applied a function to enough arguments?)
In the expression: typeRep (Proxy :: Proxy (Eq Int => Int))
In an equation for ‘test’:
test = typeRep (Proxy :: Proxy (Eq Int => Int))
diff --git a/testsuite/tests/typecheck/should_fail/T9999.stderr b/testsuite/tests/typecheck/should_fail/T9999.stderr
index ae7fa28123..0defd090b0 100644
--- a/testsuite/tests/typecheck/should_fail/T9999.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9999.stderr
@@ -1,8 +1,7 @@
-T9999.hs:13:38:
- No instance for (Typeable F1)
- (maybe you haven't applied a function to enough arguments?)
- arising from a use of ‘typeRep’
+T9999.hs:13:38: error:
+ No instance for (Typeable F1) arising from a use of ‘typeRep’
+ GHC can't yet do polykinded Typeable (F1 :: k0 -> *)
In the second argument of ‘(==)’, namely
‘typeRep (Proxy :: Proxy F1)’
In the expression:
diff --git a/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr b/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr
index 84e0862056..f63fb47789 100644
--- a/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr
+++ b/testsuite/tests/typecheck/should_fail/TcStaticPointersFail02.stderr
@@ -7,7 +7,7 @@ TcStaticPointersFail02.hs:9:6: error:
TcStaticPointersFail02.hs:12:6: error:
No instance for (Typeable (Monad m => a -> m a))
- (maybe you haven't applied a function to enough arguments?)
arising from a static form
+ (maybe you haven't applied a function to enough arguments?)
In the expression: static return
In an equation for ‘f2’: f2 = static return
diff --git a/testsuite/tests/typecheck/should_fail/tcfail046.stderr b/testsuite/tests/typecheck/should_fail/tcfail046.stderr
index 1dbfdad8f3..c144130fe4 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail046.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail046.stderr
@@ -1,15 +1,17 @@
-tcfail046.hs:10:50:
+tcfail046.hs:10:50: error:
No instance for (Eq (Process a))
arising from the first field of ‘Do’ (type ‘Process a’)
+ (maybe you haven't applied a function to enough arguments?)
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Eq (Continuation a))
-tcfail046.hs:22:25:
+tcfail046.hs:22:25: error:
No instance for (Eq (Process a))
arising from the first field of ‘Create’ (type ‘Process a’)
+ (maybe you haven't applied a function to enough arguments?)
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself