summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-12-07 14:25:30 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2018-12-07 14:44:26 +0000
commit5b7ca03995c1d5fbd29ba0e327bb2a1f344c9419 (patch)
tree24d1d51df1ea68c0216d532cf3edac4639dcfcb7 /testsuite
parenteee1b61f85d949aa7c4bc496b5579cf759d1861e (diff)
downloadhaskell-5b7ca03995c1d5fbd29ba0e327bb2a1f344c9419.tar.gz
Wibble to Taming the Kind Inference Monster
I had allowed rename/should_fail/T15828 (Trac #15828) to regress a bit. The main payload of this patch is to fix that problem, at the cost of more contortions in checkConsistentFamInst. Oh well, at least they are highly localised. I also update the -ddump-types code in TcRnDriver to print out some more expicit information about each type constructor, thus instead of DF{3} :: forall k. * -> k -> * we get data family DF{3} :: forall k. * -> k -> * Remember, this is debug-printing only. This change is the reason that so many .stderr files change.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/dependent/should_compile/T15743.stderr5
-rw-r--r--testsuite/tests/dependent/should_compile/T15743e.stderr36
-rw-r--r--testsuite/tests/indexed-types/should_compile/T15711.stderr6
-rw-r--r--testsuite/tests/indexed-types/should_compile/T15852.stderr7
-rw-r--r--testsuite/tests/indexed-types/should_compile/T3017.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.stderr8
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail2a.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail9.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T11450.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T12041.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T14230.stderr2
-rw-r--r--testsuite/tests/indexed-types/should_fail/T9160.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ADT.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_compile/Meltdown.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr9
-rw-r--r--testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr4
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SkipMany.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr4
-rw-r--r--testsuite/tests/polykinds/T14450.stderr2
-rw-r--r--testsuite/tests/polykinds/T15592.stderr4
-rw-r--r--testsuite/tests/polykinds/T15592b.stderr7
-rw-r--r--testsuite/tests/rename/should_fail/T15828.stderr2
-rw-r--r--testsuite/tests/roles/should_compile/Roles1.stderr24
-rw-r--r--testsuite/tests/roles/should_compile/Roles14.stderr4
-rw-r--r--testsuite/tests/roles/should_compile/Roles2.stderr6
-rw-r--r--testsuite/tests/roles/should_compile/Roles3.stderr22
-rw-r--r--testsuite/tests/roles/should_compile/Roles4.stderr6
-rw-r--r--testsuite/tests/roles/should_compile/T8958.stderr10
-rw-r--r--testsuite/tests/th/TH_Roles2.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/T12763.stderr2
-rw-r--r--testsuite/tests/typecheck/should_compile/tc231.stderr6
32 files changed, 119 insertions, 96 deletions
diff --git a/testsuite/tests/dependent/should_compile/T15743.stderr b/testsuite/tests/dependent/should_compile/T15743.stderr
index f44c430d8d..ea84b953fb 100644
--- a/testsuite/tests/dependent/should_compile/T15743.stderr
+++ b/testsuite/tests/dependent/should_compile/T15743.stderr
@@ -1,6 +1,7 @@
TYPE CONSTRUCTORS
- type role T nominal nominal nominal phantom phantom phantom
- T{6} :: forall {k1} k2 (k3 :: k2). Proxy k3 -> k1 -> k2 -> *
+ data type T{6} ::
+ forall {k1} k2 (k3 :: k2). Proxy k3 -> k1 -> k2 -> *
+ roles nominal nominal nominal phantom phantom phantom
Dependent modules: []
Dependent packages: [base-4.12.0.0, ghc-prim-0.5.3,
integer-gmp-1.0.2.0]
diff --git a/testsuite/tests/dependent/should_compile/T15743e.stderr b/testsuite/tests/dependent/should_compile/T15743e.stderr
index f96da68a7f..dcfdd2e831 100644
--- a/testsuite/tests/dependent/should_compile/T15743e.stderr
+++ b/testsuite/tests/dependent/should_compile/T15743e.stderr
@@ -1,16 +1,26 @@
TYPE CONSTRUCTORS
- type role T
- nominal nominal nominal nominal nominal nominal phantom phantom representational nominal nominal phantom nominal phantom
- T{14} ::
+ data type T{14} ::
forall {k1} {k2} {k3} (k4 :: k2) k5. forall k6 ->
k6
-> Proxy k4
-> (k3 -> *)
-> k3
-> forall (k7 :: k1). Proxy k7 -> forall (k8 :: k5). Proxy k8 -> *
- type role T2
- nominal nominal nominal nominal nominal phantom phantom representational nominal nominal phantom nominal nominal phantom
- T2{14} ::
+ roles nominal
+ nominal
+ nominal
+ nominal
+ nominal
+ nominal
+ phantom
+ phantom
+ representational
+ nominal
+ nominal
+ phantom
+ nominal
+ phantom
+ data type T2{14} ::
forall {k1} {k2} (k3 :: k2) k7. forall k4 ->
k4
-> Proxy k3
@@ -18,6 +28,20 @@ TYPE CONSTRUCTORS
-> k7
-> forall (k5 :: k1).
Proxy k5 -> forall k6 (k8 :: k6). Proxy k8 -> *
+ roles nominal
+ nominal
+ nominal
+ nominal
+ nominal
+ phantom
+ phantom
+ representational
+ nominal
+ nominal
+ phantom
+ nominal
+ nominal
+ phantom
DATA CONSTRUCTORS
MkT2 :: forall {k7} {k1} {k2 :: k1} {k3} {k4 :: k3} {k5} {k6 :: k5}
(f :: k7 -> *) (c :: k7) k8 (a :: k8) (b :: Proxy k2)
diff --git a/testsuite/tests/indexed-types/should_compile/T15711.stderr b/testsuite/tests/indexed-types/should_compile/T15711.stderr
index 2a012489e7..7101dce027 100644
--- a/testsuite/tests/indexed-types/should_compile/T15711.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T15711.stderr
@@ -1,7 +1,7 @@
TYPE CONSTRUCTORS
- C{1} :: * -> Constraint
- type role F nominal nominal
- F{2} :: forall a. Maybe a -> *
+ class C{1} :: * -> Constraint
+ associated type family F{2} :: forall a. Maybe a -> *
+ roles nominal nominal
Dependent modules: []
Dependent packages: [base-4.12.0.0, ghc-prim-0.5.3,
integer-gmp-1.0.2.0]
diff --git a/testsuite/tests/indexed-types/should_compile/T15852.stderr b/testsuite/tests/indexed-types/should_compile/T15852.stderr
index 6908d000ab..9024739ecb 100644
--- a/testsuite/tests/indexed-types/should_compile/T15852.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T15852.stderr
@@ -1,14 +1,13 @@
TYPE CONSTRUCTORS
- type role DF nominal nominal nominal
- DF{3} :: forall k. * -> k -> *
+ data family DF{3} :: forall k. * -> k -> *
+ roles nominal nominal nominal
COERCION AXIOMS
axiom T15852.D:R:DFProxyProxy0 ::
forall k1 k2 (j :: k1) (c :: k2).
DF (Proxy c) = T15852.R:DFProxyProxy k1 k2 j c
FAMILY INSTANCES
data instance forall k1 k2 (j :: k1) (c :: k2).
- DF (Proxy c) = T15852.R:DFProxyProxy k1 k2 j c
- -- Defined at T15852.hs:10:15
+ DF (Proxy c) -- Defined at T15852.hs:10:15
Dependent modules: []
Dependent packages: [base-4.12.0.0, ghc-prim-0.5.3,
integer-gmp-1.0.2.0]
diff --git a/testsuite/tests/indexed-types/should_compile/T3017.stderr b/testsuite/tests/indexed-types/should_compile/T3017.stderr
index 9cf31965a4..8b5f8688dc 100644
--- a/testsuite/tests/indexed-types/should_compile/T3017.stderr
+++ b/testsuite/tests/indexed-types/should_compile/T3017.stderr
@@ -5,10 +5,10 @@ TYPE SIGNATURES
test2 ::
forall c a b. (Coll c, Num a, Num b, Elem c ~ (a, b)) => c -> c
TYPE CONSTRUCTORS
- Coll{1} :: * -> Constraint
- type role Elem nominal
- Elem{1} :: * -> *
- ListColl{1} :: * -> *
+ class Coll{1} :: * -> Constraint
+ associated type family Elem{1} :: * -> *
+ roles nominal
+ data type ListColl{1} :: * -> *
COERCION AXIOMS
axiom Foo.D:R:ElemListColl :: Elem (ListColl a) = a
DATA CONSTRUCTORS
diff --git a/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.stderr b/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.stderr
index 8e268d6301..e7065cf3b4 100644
--- a/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.stderr
+++ b/testsuite/tests/indexed-types/should_fail/ExplicitForAllFams4b.stderr
@@ -47,7 +47,7 @@ ExplicitForAllFams4b.hs:16:25: error:
ExplicitForAllFams4b.hs:23:3: error:
• Type indexes must match class instance head
Expected: CT Int _
- Actual: CT [a] (a, a) -- Defined at ExplicitForAllFams4b.hs:23:20
+ Actual: CT [a] (a, a)
• In the type instance declaration for ‘CT’
In the instance declaration for ‘C Int’
@@ -65,7 +65,7 @@ ExplicitForAllFams4b.hs:23:20: error:
ExplicitForAllFams4b.hs:24:3: error:
• Type indexes must match class instance head
Expected: CT Int _
- Actual: CT _ _ -- Defined at ExplicitForAllFams4b.hs:24:20
+ Actual: CT _ _
• In the type instance declaration for ‘CT’
In the instance declaration for ‘C Int’
@@ -78,7 +78,7 @@ ExplicitForAllFams4b.hs:24:15: error:
ExplicitForAllFams4b.hs:26:3: error:
• Type indexes must match class instance head
Expected: CD Int _
- Actual: CD [a] (a, a) -- Defined at ExplicitForAllFams4b.hs:26:20
+ Actual: CD [a] (a, a)
• In the data instance declaration for ‘CD’
In the instance declaration for ‘C Int’
@@ -96,7 +96,7 @@ ExplicitForAllFams4b.hs:26:20: error:
ExplicitForAllFams4b.hs:27:3: error:
• Type indexes must match class instance head
Expected: CD Int _
- Actual: CD _ _ -- Defined at ExplicitForAllFams4b.hs:27:20
+ Actual: CD _ _
• In the data instance declaration for ‘CD’
In the instance declaration for ‘C Int’
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail2a.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail2a.stderr
index b21375ceb2..ebe0e53c1e 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail2a.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail2a.stderr
@@ -2,7 +2,7 @@
SimpleFail2a.hs:11:3: error:
• Type indexes must match class instance head
Expected: Sd Int
- Actual: Sd a -- Defined at SimpleFail2a.hs:11:11
+ Actual: Sd a
• In the data instance declaration for ‘Sd’
In the instance declaration for ‘C Int’
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail9.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail9.stderr
index b3dd8ef839..114f7e1e32 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail9.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail9.stderr
@@ -2,6 +2,6 @@
SimpleFail9.hs:16:3: error:
• Type indexes must match class instance head
Expected: S7 (a, Int)
- Actual: S7 (b, Int) -- Defined at SimpleFail9.hs:16:8
+ Actual: S7 (b, Int)
• In the data instance declaration for ‘S7’
In the instance declaration for ‘C7 Char (a, Int)’
diff --git a/testsuite/tests/indexed-types/should_fail/T11450.stderr b/testsuite/tests/indexed-types/should_fail/T11450.stderr
index f5be9d48c3..0ecdfb957c 100644
--- a/testsuite/tests/indexed-types/should_fail/T11450.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T11450.stderr
@@ -2,6 +2,6 @@
T11450.hs:9:3: error:
• Type indexes must match class instance head
Expected: T (Either a b)
- Actual: T (Either b a) -- Defined at T11450.hs:9:8
+ Actual: T (Either b a)
• In the type instance declaration for ‘T’
In the instance declaration for ‘C (Either a b)’
diff --git a/testsuite/tests/indexed-types/should_fail/T12041.stderr b/testsuite/tests/indexed-types/should_fail/T12041.stderr
index d16a9cc49c..4c008661d1 100644
--- a/testsuite/tests/indexed-types/should_fail/T12041.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T12041.stderr
@@ -2,6 +2,6 @@
T12041.hs:12:3: error:
• Type indexes must match class instance head
Expected: Ob @i (I @{i} @{i})
- Actual: Ob @* (I @{*} @{*}) -- Defined at T12041.hs:12:8
+ Actual: Ob @* (I @{*} @{*})
• In the type instance declaration for ‘Ob’
In the instance declaration for ‘Category I’
diff --git a/testsuite/tests/indexed-types/should_fail/T14230.stderr b/testsuite/tests/indexed-types/should_fail/T14230.stderr
index 174a15a48f..55de0b7a37 100644
--- a/testsuite/tests/indexed-types/should_fail/T14230.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T14230.stderr
@@ -2,6 +2,6 @@
T14230.hs:11:3: error:
• Type indexes must match class instance head
Expected: CD @(Maybe a)
- Actual: CD @(k -> *) -- Defined at T14230.hs:11:8
+ Actual: CD @(k -> *)
• In the data instance declaration for ‘CD’
In the instance declaration for ‘C (Maybe a)’
diff --git a/testsuite/tests/indexed-types/should_fail/T9160.stderr b/testsuite/tests/indexed-types/should_fail/T9160.stderr
index 36a1cb6767..e918013f67 100644
--- a/testsuite/tests/indexed-types/should_fail/T9160.stderr
+++ b/testsuite/tests/indexed-types/should_fail/T9160.stderr
@@ -2,6 +2,6 @@
T9160.hs:19:3: error:
• Type indexes must match class instance head
Expected: F @*
- Actual: F @(* -> *) -- Defined at T9160.hs:19:8
+ Actual: F @(* -> *)
• In the type instance declaration for ‘F’
In the instance declaration for ‘C (a :: *)’
diff --git a/testsuite/tests/partial-sigs/should_compile/ADT.stderr b/testsuite/tests/partial-sigs/should_compile/ADT.stderr
index 385a44b737..421a03ff00 100644
--- a/testsuite/tests/partial-sigs/should_compile/ADT.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/ADT.stderr
@@ -1,7 +1,7 @@
TYPE SIGNATURES
bar :: Int -> Foo Bool () Int
TYPE CONSTRUCTORS
- Foo{3} :: * -> * -> * -> *
+ data type Foo{3} :: * -> * -> * -> *
DATA CONSTRUCTORS
Foo :: forall x y z. x -> y -> z -> Foo x y z
Dependent modules: []
diff --git a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
index 6f68f3cd66..f17860f975 100644
--- a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
@@ -1,9 +1,9 @@
TYPE SIGNATURES
foo :: Sing 'A
TYPE CONSTRUCTORS
- MyKind{0} :: *
- type role Sing nominal nominal
- Sing{2} :: forall k. k -> *
+ data type MyKind{0} :: *
+ data family Sing{2} :: forall k. k -> *
+ roles nominal nominal
COERCION AXIOMS
axiom DataFamilyInstanceLHS.D:R:SingMyKind_0 ::
Sing = DataFamilyInstanceLHS.R:SingMyKind_
@@ -13,8 +13,7 @@ DATA CONSTRUCTORS
SingA :: Sing 'A
SingB :: Sing 'B
FAMILY INSTANCES
- data instance Sing _ = DataFamilyInstanceLHS.R:SingMyKind_ _
- -- Defined at DataFamilyInstanceLHS.hs:8:15
+ data instance Sing _ -- Defined at DataFamilyInstanceLHS.hs:8:15
Dependent modules: []
Dependent packages: [base-4.12.0.0, ghc-prim-0.5.3,
integer-gmp-1.0.2.0]
diff --git a/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr b/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr
index a40ecfeee0..8e14ffd0af 100644
--- a/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr
@@ -4,8 +4,8 @@ TYPE SIGNATURES
forall param1 param2.
NukeMonad param1 param2 () -> NukeMonad param1 param2 ()
TYPE CONSTRUCTORS
- type role NukeMonad phantom phantom phantom
- NukeMonad{3} :: * -> * -> * -> *
+ data type NukeMonad{3} :: * -> * -> * -> *
+ roles phantom phantom phantom
CLASS INSTANCES
instance Functor (NukeMonad a b) -- Defined at Meltdown.hs:8:10
instance Applicative (NukeMonad a b)
diff --git a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr
index 94245d6aa2..0569228ac4 100644
--- a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr
@@ -1,7 +1,7 @@
TYPE CONSTRUCTORS
- MyKind{0} :: *
- type role Sing nominal nominal
- Sing{2} :: forall k. k -> *
+ data type MyKind{0} :: *
+ data family Sing{2} :: forall k. k -> *
+ roles nominal nominal
COERCION AXIOMS
axiom NamedWildcardInDataFamilyInstanceLHS.D:R:SingMyKind_a0 ::
Sing = NamedWildcardInDataFamilyInstanceLHS.R:SingMyKind_a
@@ -11,8 +11,7 @@ DATA CONSTRUCTORS
SingA :: Sing 'A
SingB :: Sing 'B
FAMILY INSTANCES
- data instance Sing
- _a = NamedWildcardInDataFamilyInstanceLHS.R:SingMyKind_a _a
+ data instance Sing _a
-- Defined at NamedWildcardInDataFamilyInstanceLHS.hs:8:15
Dependent modules: []
Dependent packages: [base-4.12.0.0, ghc-prim-0.5.3,
diff --git a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr
index 5a709fff9d..690a1c689d 100644
--- a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr
@@ -1,6 +1,6 @@
TYPE CONSTRUCTORS
- type role F nominal
- F{1} :: * -> *
+ type family F{1} :: * -> *
+ roles nominal
COERCION AXIOMS
axiom NamedWildcardInTypeFamilyInstanceLHS.D:R:F :: F _t = Int
Dependent modules: []
diff --git a/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr b/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
index 0ee0a34564..25555b46c0 100644
--- a/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
@@ -4,7 +4,7 @@ TYPE SIGNATURES
skipMany' ::
forall tok st a. GenParser tok st a -> GenParser tok st ()
TYPE CONSTRUCTORS
- GenParser{3} :: * -> * -> * -> *
+ data type GenParser{3} :: * -> * -> * -> *
DATA CONSTRUCTORS
GenParser :: forall tok st a. tok -> st -> a -> GenParser tok st a
Dependent modules: []
diff --git a/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
index 8f24ba1384..e0a2bfc2a2 100644
--- a/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
@@ -1,8 +1,8 @@
TYPE SIGNATURES
foo :: F Int Char -> Int
TYPE CONSTRUCTORS
- type role F nominal nominal
- F{2} :: * -> * -> *
+ type family F{2} :: * -> * -> *
+ roles nominal nominal
COERCION AXIOMS
axiom TypeFamilyInstanceLHS.D:R:FBool_1 :: F Bool _1 = Bool
axiom TypeFamilyInstanceLHS.D:R:FInt_1 :: F Int _1 = Int
diff --git a/testsuite/tests/polykinds/T14450.stderr b/testsuite/tests/polykinds/T14450.stderr
index 107f4aa2ce..927ae6a720 100644
--- a/testsuite/tests/polykinds/T14450.stderr
+++ b/testsuite/tests/polykinds/T14450.stderr
@@ -2,6 +2,6 @@
T14450.hs:33:3: error:
• Type indexes must match class instance head
Expected: Dom @k @k (IddSym0 @k)
- Actual: Dom @* @* (IddSym0 @*) -- Defined at T14450.hs:33:8
+ Actual: Dom @* @* (IddSym0 @*)
• In the type instance declaration for ‘Dom’
In the instance declaration for ‘Varpi (IddSym0 :: k ~> k)’
diff --git a/testsuite/tests/polykinds/T15592.stderr b/testsuite/tests/polykinds/T15592.stderr
index 4086c12bf6..c2aa24d7f3 100644
--- a/testsuite/tests/polykinds/T15592.stderr
+++ b/testsuite/tests/polykinds/T15592.stderr
@@ -1,6 +1,6 @@
TYPE CONSTRUCTORS
- type role T nominal nominal representational nominal nominal
- T{5} :: forall {k} k1. (k1 -> k -> *) -> k1 -> k -> *
+ data type T{5} :: forall {k} k1. (k1 -> k -> *) -> k1 -> k -> *
+ roles nominal nominal representational nominal nominal
DATA CONSTRUCTORS
MkT :: forall {k} k1 (f :: k1 -> k -> *) (a :: k1) (b :: k).
f a b -> T f a b -> T f a b
diff --git a/testsuite/tests/polykinds/T15592b.stderr b/testsuite/tests/polykinds/T15592b.stderr
index d07b3a1ac7..6db525c8a6 100644
--- a/testsuite/tests/polykinds/T15592b.stderr
+++ b/testsuite/tests/polykinds/T15592b.stderr
@@ -1,7 +1,8 @@
TYPE CONSTRUCTORS
- C{2} :: forall {k}. k -> Constraint
- type role T nominal nominal nominal nominal
- T{4} :: forall k (f :: k -> *) (a :: k). f a -> *
+ class C{2} :: forall {k}. k -> Constraint
+ associated type family T{4} ::
+ forall k (f :: k -> *) (a :: k). f a -> *
+ roles nominal nominal nominal nominal
Dependent modules: []
Dependent packages: [base-4.12.0.0, ghc-prim-0.5.3,
integer-gmp-1.0.2.0]
diff --git a/testsuite/tests/rename/should_fail/T15828.stderr b/testsuite/tests/rename/should_fail/T15828.stderr
index 9ca6366e92..9e860d2c79 100644
--- a/testsuite/tests/rename/should_fail/T15828.stderr
+++ b/testsuite/tests/rename/should_fail/T15828.stderr
@@ -2,6 +2,6 @@
T15828.hs:9:3: error:
• Type indexes must match class instance head
Expected: T (Maybe a) _
- Actual: T (Maybe a) b -- Defined at T15828.hs:9:20
+ Actual: T (Maybe a1) b
• In the type instance declaration for ‘T’
In the instance declaration for ‘C (Maybe a)’
diff --git a/testsuite/tests/roles/should_compile/Roles1.stderr b/testsuite/tests/roles/should_compile/Roles1.stderr
index c2678b71d7..a54b9e9856 100644
--- a/testsuite/tests/roles/should_compile/Roles1.stderr
+++ b/testsuite/tests/roles/should_compile/Roles1.stderr
@@ -1,16 +1,16 @@
TYPE CONSTRUCTORS
- type role T1 nominal
- T1{1} :: * -> *
- T2{1} :: * -> *
- type role T3 nominal phantom
- T3{2} :: forall k. k -> *
- type role T4 nominal nominal
- T4{2} :: (* -> *) -> * -> *
- T5{1} :: * -> *
- type role T6 nominal phantom
- T6{2} :: forall {k}. k -> *
- type role T7 nominal phantom representational
- T7{3} :: forall {k}. k -> * -> *
+ data type T1{1} :: * -> *
+ roles nominal
+ data type T2{1} :: * -> *
+ data type T3{2} :: forall k. k -> *
+ roles nominal phantom
+ data type T4{2} :: (* -> *) -> * -> *
+ roles nominal nominal
+ data type T5{1} :: * -> *
+ data type T6{2} :: forall {k}. k -> *
+ roles nominal phantom
+ data type T7{3} :: forall {k}. k -> * -> *
+ roles nominal phantom representational
DATA CONSTRUCTORS
K7 :: forall {k} (a :: k) b. b -> T7 a b
K6 :: forall {k} (a :: k). T6 a
diff --git a/testsuite/tests/roles/should_compile/Roles14.stderr b/testsuite/tests/roles/should_compile/Roles14.stderr
index 1745332a6b..8df56e5fc6 100644
--- a/testsuite/tests/roles/should_compile/Roles14.stderr
+++ b/testsuite/tests/roles/should_compile/Roles14.stderr
@@ -1,8 +1,8 @@
TYPE SIGNATURES
meth2 :: forall a. C2 a => a -> a
TYPE CONSTRUCTORS
- type role C2 representational
- C2{1} :: * -> Constraint
+ class C2{1} :: * -> Constraint
+ roles representational
COERCION AXIOMS
axiom Roles12.N:C2 :: C2 a = a -> a
Dependent modules: []
diff --git a/testsuite/tests/roles/should_compile/Roles2.stderr b/testsuite/tests/roles/should_compile/Roles2.stderr
index 170315111d..425cc0c8de 100644
--- a/testsuite/tests/roles/should_compile/Roles2.stderr
+++ b/testsuite/tests/roles/should_compile/Roles2.stderr
@@ -1,7 +1,7 @@
TYPE CONSTRUCTORS
- T1{1} :: * -> *
- type role T2 phantom
- T2{1} :: * -> *
+ data type T1{1} :: * -> *
+ data type T2{1} :: * -> *
+ roles phantom
DATA CONSTRUCTORS
K2 :: forall a. FunPtr a -> T2 a
K1 :: forall a. IO a -> T1 a
diff --git a/testsuite/tests/roles/should_compile/Roles3.stderr b/testsuite/tests/roles/should_compile/Roles3.stderr
index bf76b72987..16fbdf037c 100644
--- a/testsuite/tests/roles/should_compile/Roles3.stderr
+++ b/testsuite/tests/roles/should_compile/Roles3.stderr
@@ -4,17 +4,17 @@ TYPE SIGNATURES
meth3 :: forall a b. C3 a b => a -> F3 b -> F3 b
meth4 :: forall a b. C4 a b => a -> F4 b -> F4 b
TYPE CONSTRUCTORS
- C1{1} :: * -> Constraint
- C2{2} :: * -> * -> Constraint
- C3{2} :: * -> * -> Constraint
- C4{2} :: * -> * -> Constraint
- type role F3 nominal
- F3{1} :: * -> *
- type role F4 nominal
- F4{1} :: * -> *
- type role Syn1 nominal
- Syn1{1} :: * -> *
- Syn2{1} :: * -> *
+ class C1{1} :: * -> Constraint
+ class C2{2} :: * -> * -> Constraint
+ class C3{2} :: * -> * -> Constraint
+ class C4{2} :: * -> * -> Constraint
+ associated type family F3{1} :: * -> *
+ roles nominal
+ type family F4{1} :: * -> *
+ roles nominal
+ type synonym Syn1{1} :: * -> *
+ roles nominal
+ type synonym Syn2{1} :: * -> *
COERCION AXIOMS
axiom Roles3.N:C1 :: C1 a = a -> a
axiom Roles3.N:C2 :: C2 a b = (a ~ b) => a -> b
diff --git a/testsuite/tests/roles/should_compile/Roles4.stderr b/testsuite/tests/roles/should_compile/Roles4.stderr
index dbca015edb..eb5d26a6d4 100644
--- a/testsuite/tests/roles/should_compile/Roles4.stderr
+++ b/testsuite/tests/roles/should_compile/Roles4.stderr
@@ -2,9 +2,9 @@ TYPE SIGNATURES
meth1 :: forall a. C1 a => a -> a
meth3 :: forall a. C3 a => a -> Syn1 a
TYPE CONSTRUCTORS
- C1{1} :: * -> Constraint
- C3{1} :: * -> Constraint
- Syn1{1} :: * -> *
+ class C1{1} :: * -> Constraint
+ class C3{1} :: * -> Constraint
+ type synonym Syn1{1} :: * -> *
COERCION AXIOMS
axiom Roles4.N:C1 :: C1 a = a -> a
axiom Roles4.N:C3 :: C3 a = a -> Syn1 a
diff --git a/testsuite/tests/roles/should_compile/T8958.stderr b/testsuite/tests/roles/should_compile/T8958.stderr
index 4e2fe00e87..930c05b2d7 100644
--- a/testsuite/tests/roles/should_compile/T8958.stderr
+++ b/testsuite/tests/roles/should_compile/T8958.stderr
@@ -2,11 +2,11 @@
T8958.hs:1:31: warning:
-XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language.
TYPE CONSTRUCTORS
- type role Map nominal representational
- Map{2} :: * -> * -> *
- Nominal{1} :: * -> Constraint
- type role Representational representational
- Representational{1} :: * -> Constraint
+ newtype Map{2} :: * -> * -> *
+ roles nominal representational
+ class Nominal{1} :: * -> Constraint
+ class Representational{1} :: * -> Constraint
+ roles representational
COERCION AXIOMS
axiom T8958.N:Map :: Map k v = [(k, v)]
DATA CONSTRUCTORS
diff --git a/testsuite/tests/th/TH_Roles2.stderr b/testsuite/tests/th/TH_Roles2.stderr
index 3807609678..2970df6346 100644
--- a/testsuite/tests/th/TH_Roles2.stderr
+++ b/testsuite/tests/th/TH_Roles2.stderr
@@ -1,6 +1,6 @@
TYPE CONSTRUCTORS
- type role T nominal representational
- T{2} :: forall k. k -> *
+ data type T{2} :: forall k. k -> *
+ roles nominal representational
Dependent modules: []
Dependent packages: [array-0.5.2.0, base-4.12.0.0, deepseq-1.4.4.0,
ghc-boot-th-8.7, ghc-prim-0.5.3, integer-gmp-1.0.2.0,
diff --git a/testsuite/tests/typecheck/should_compile/T12763.stderr b/testsuite/tests/typecheck/should_compile/T12763.stderr
index 99a66bd59e..eff7c0a28f 100644
--- a/testsuite/tests/typecheck/should_compile/T12763.stderr
+++ b/testsuite/tests/typecheck/should_compile/T12763.stderr
@@ -2,7 +2,7 @@ TYPE SIGNATURES
f :: Int -> ()
m :: forall a. C a => a -> ()
TYPE CONSTRUCTORS
- C{1} :: * -> Constraint
+ class C{1} :: * -> Constraint
COERCION AXIOMS
axiom T12763.N:C :: C a = a -> ()
CLASS INSTANCES
diff --git a/testsuite/tests/typecheck/should_compile/tc231.stderr b/testsuite/tests/typecheck/should_compile/tc231.stderr
index 18beabd3a1..8340d3f033 100644
--- a/testsuite/tests/typecheck/should_compile/tc231.stderr
+++ b/testsuite/tests/typecheck/should_compile/tc231.stderr
@@ -6,9 +6,9 @@ TYPE SIGNATURES
huh :: forall s a b chain. Zork s a b => Q s a chain -> ST s ()
s :: forall t t1. Q t (Z [Char]) t1 -> Q t (Z [Char]) t1
TYPE CONSTRUCTORS
- Q{3} :: * -> * -> * -> *
- Z{1} :: * -> *
- Zork{3} :: * -> * -> * -> Constraint
+ data type Q{3} :: * -> * -> * -> *
+ data type Z{1} :: * -> *
+ class Zork{3} :: * -> * -> * -> Constraint
COERCION AXIOMS
axiom N:Zork :: Zork s a b = forall chain. Q s a chain -> ST s ()
DATA CONSTRUCTORS