summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-06-07 14:07:09 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2012-06-07 14:07:09 +0100
commite8ec57988ce2191ed53fdbb3ba425f4a39ef76f0 (patch)
tree113ed04dca501eeaa6d785ff42a4c468957c731e
parent208fa3a41f475678e4629421651b43f43d334476 (diff)
downloadhaskell-e8ec57988ce2191ed53fdbb3ba425f4a39ef76f0.tar.gz
Error message wibbles
-rw-r--r--testsuite/tests/polykinds/PolyKinds06.stderr10
-rw-r--r--testsuite/tests/polykinds/PolyKinds07.stderr13
-rw-r--r--testsuite/tests/polykinds/PolyKinds12.hs2
-rw-r--r--testsuite/tests/polykinds/T5716.stderr12
-rw-r--r--testsuite/tests/polykinds/T5716a.stderr9
-rw-r--r--testsuite/tests/polykinds/T5862.hs2
-rw-r--r--testsuite/tests/polykinds/T5938.hs2
-rw-r--r--testsuite/tests/polykinds/T6039.stderr1
-rw-r--r--testsuite/tests/th/T1835.stdout6
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail043.stderr2
10 files changed, 30 insertions, 29 deletions
diff --git a/testsuite/tests/polykinds/PolyKinds06.stderr b/testsuite/tests/polykinds/PolyKinds06.stderr
index 314bb20a87..151e636cb1 100644
--- a/testsuite/tests/polykinds/PolyKinds06.stderr
+++ b/testsuite/tests/polykinds/PolyKinds06.stderr
@@ -1,6 +1,4 @@
-
-PolyKinds06.hs:10:11:
- Promoted kind `A1' used in a mutually recursive group
- In the type `B A1'
- In the definition of data constructor `B1'
- In the data declaration for `B'
+
+PolyKinds06.hs:9:11:
+ Promoted kind `A' used in a mutually recursive group
+ In the kind `A -> *'
diff --git a/testsuite/tests/polykinds/PolyKinds07.stderr b/testsuite/tests/polykinds/PolyKinds07.stderr
index 203e3aad4b..1e1492050f 100644
--- a/testsuite/tests/polykinds/PolyKinds07.stderr
+++ b/testsuite/tests/polykinds/PolyKinds07.stderr
@@ -1,6 +1,7 @@
-
-PolyKinds07.hs:10:11:
- Promoted kind `A1' used in a mutually recursive group
- In the type `B A1'
- In the definition of data constructor `B1'
- In the data declaration for `B'
+
+PolyKinds07.hs:10:11:
+ You can't use data constructor `A1' here
+ (it is defined and used in the same recursive group)
+ In the type `B A1'
+ In the definition of data constructor `B1'
+ In the data declaration for `B'
diff --git a/testsuite/tests/polykinds/PolyKinds12.hs b/testsuite/tests/polykinds/PolyKinds12.hs
index 4c1cc4df5c..49ccf87597 100644
--- a/testsuite/tests/polykinds/PolyKinds12.hs
+++ b/testsuite/tests/polykinds/PolyKinds12.hs
@@ -18,7 +18,7 @@ test2 :: SBool b -> If1 b Int Char
test2 STrue = 42
test2 SFalse = 'H'
-type family Apply f x
+type family Apply (f :: k1 -> k2) (x :: k1) :: k2
type instance Apply f x = f x
higher1v1 :: SBool b -> (If1 b Maybe []) Char
diff --git a/testsuite/tests/polykinds/T5716.stderr b/testsuite/tests/polykinds/T5716.stderr
index 76b20cdf86..7e38d01f6e 100644
--- a/testsuite/tests/polykinds/T5716.stderr
+++ b/testsuite/tests/polykinds/T5716.stderr
@@ -1,6 +1,6 @@
-
-T5716.hs:13:33:
- `U1' of type `DF * Int -> U' is not promotable
- In the type `I (U1 DFInt)'
- In the definition of data constructor `I1'
- In the data declaration for `I'
+
+T5716.hs:13:33:
+ `U1' of type `DF Int -> U' is not promotable
+ In the type `I (U1 DFInt)'
+ In the definition of data constructor `I1'
+ In the data declaration for `I'
diff --git a/testsuite/tests/polykinds/T5716a.stderr b/testsuite/tests/polykinds/T5716a.stderr
index 0578a2c113..146bce5f92 100644
--- a/testsuite/tests/polykinds/T5716a.stderr
+++ b/testsuite/tests/polykinds/T5716a.stderr
@@ -1,4 +1,7 @@
-T5716a.hs:10:1:
- Cycle in type declarations: data constructor used (in a type) before it is defined
- T5716a.hs:10:1-32: data instance DF a = Bar (Bar a)
+T5716a.hs:10:27:
+ You can't use data constructor `Bar' here
+ (it comes from a data family instance)
+ In the type `Bar a'
+ In the definition of data constructor `Bar'
+ In the data instance declaration for `DF'
diff --git a/testsuite/tests/polykinds/T5862.hs b/testsuite/tests/polykinds/T5862.hs
index e2b37bfb3c..4626245de6 100644
--- a/testsuite/tests/polykinds/T5862.hs
+++ b/testsuite/tests/polykinds/T5862.hs
@@ -21,7 +21,7 @@ data SMaybe a where
SNothing :: SMaybe 'Nothing
SJust :: Sing a -> SMaybe ('Just a)
-type family Sing a
+type family Sing (a :: k)
type instance Sing (a :: Nat) = SNat a
type instance Sing (a :: Bool) = SBool a
type instance Sing (a :: Maybe *) = SMaybe a -- want to say Maybe k
diff --git a/testsuite/tests/polykinds/T5938.hs b/testsuite/tests/polykinds/T5938.hs
index 1e78f759ef..e2c63af8a2 100644
--- a/testsuite/tests/polykinds/T5938.hs
+++ b/testsuite/tests/polykinds/T5938.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE PolyKinds, TypeFamilies, DataKinds #-}
module T5938 where
-type family KindFam a
+type family KindFam (a :: k)
type instance KindFam (a :: *) = Int
type instance KindFam (a :: Bool) = Bool
type instance KindFam (a :: Maybe k) = Char -- doesn't work
diff --git a/testsuite/tests/polykinds/T6039.stderr b/testsuite/tests/polykinds/T6039.stderr
index efa4c5169b..7620c3adfb 100644
--- a/testsuite/tests/polykinds/T6039.stderr
+++ b/testsuite/tests/polykinds/T6039.stderr
@@ -2,4 +2,3 @@
T6039.hs:5:14:
Kind variable `j' cannot appear in a function position
In the kind `j k'
- In the data declaration for `T'
diff --git a/testsuite/tests/th/T1835.stdout b/testsuite/tests/th/T1835.stdout
index c82b6723f9..ba8e65f418 100644
--- a/testsuite/tests/th/T1835.stdout
+++ b/testsuite/tests/th/T1835.stdout
@@ -1,8 +1,8 @@
class GHC.Classes.Eq a_0 => Main.MyClass a_0
-instance GHC.Classes.Ord a_1 => Main.MyClass (Main.Quux2 a_1)
-instance GHC.Classes.Eq a_2 => Main.MyClass (Main.Quux a_2)
-instance Main.MyClass Main.Baz
instance Main.MyClass Main.Foo
+instance Main.MyClass Main.Baz
+instance GHC.Classes.Eq a_1 => Main.MyClass (Main.Quux a_1)
+instance GHC.Classes.Ord a_2 => Main.MyClass (Main.Quux2 a_2)
True
True
True
diff --git a/testsuite/tests/typecheck/should_fail/tcfail043.stderr b/testsuite/tests/typecheck/should_fail/tcfail043.stderr
index a1904d2b4c..3e52e69c56 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail043.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail043.stderr
@@ -29,8 +29,8 @@ tcfail043.hs:40:25:
Probable fix: give these definition(s) an explicit type signature
or use -XNoMonomorphismRestriction
Note: there are several potential instances:
- instance Eq_ Int -- Defined at tcfail043.hs:20:10
instance Eq_ a => Eq_ [a] -- Defined at tcfail043.hs:23:10
+ instance Eq_ Int -- Defined at tcfail043.hs:20:10
In the expression: eq a (hd bs)
In the expression: if eq a (hd bs) then True else search a (tl bs)
In the expression: