diff options
-rw-r--r-- | testsuite/tests/ghci/scripts/T4087.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T4175.stdout | 11 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T5417.stdout | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T7939.stdout | 16 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci025.stdout | 6 | ||||
-rw-r--r-- | testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr | 21 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/rnfail055.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/roles/should_fail/Roles12.stderr | 14 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T3468.stderr | 3 |
9 files changed, 57 insertions, 25 deletions
diff --git a/testsuite/tests/ghci/scripts/T4087.stdout b/testsuite/tests/ghci/scripts/T4087.stdout index ece136b610..3f600bd78d 100644 --- a/testsuite/tests/ghci/scripts/T4087.stdout +++ b/testsuite/tests/ghci/scripts/T4087.stdout @@ -1,3 +1,4 @@ +type role Equal nominal nominal data Equal a b where Equal :: Equal a a -- Defined at T4087.hs:5:1 diff --git a/testsuite/tests/ghci/scripts/T4175.stdout b/testsuite/tests/ghci/scripts/T4175.stdout index a253cf25bf..81d21a2c2a 100644 --- a/testsuite/tests/ghci/scripts/T4175.stdout +++ b/testsuite/tests/ghci/scripts/T4175.stdout @@ -1,13 +1,20 @@ -type family A a b :: * -- Defined at T4175.hs:4:1 +type role A nominal nominal +type family A a b :: * + -- Defined at T4175.hs:4:1 type instance A (Maybe a) a -- Defined at T4175.hs:6:1 type instance A Int Int -- Defined at T4175.hs:5:1 -data family B a -- Defined at T4175.hs:8:1 +type role B nominal +data family B a + -- Defined at T4175.hs:8:1 data instance B () -- Defined at T4175.hs:9:15 +type role C nominal class C a where + type role D nominal nominal type family D a b :: * -- Defined at T4175.hs:12:5 type D () () -- Defined at T4175.hs:18:5 type D Int () -- Defined at T4175.hs:15:5 +type role E nominal type family E a :: * where E () = Bool E Int = String diff --git a/testsuite/tests/ghci/scripts/T5417.stdout b/testsuite/tests/ghci/scripts/T5417.stdout index 80bb298860..b78ee64f73 100644 --- a/testsuite/tests/ghci/scripts/T5417.stdout +++ b/testsuite/tests/ghci/scripts/T5417.stdout @@ -1,7 +1,11 @@ data B1 a = B1 a +type role T5417.R:FB1 nominal data instance C.F (B1 a) = B2 a +type role D nominal data family D a +type role C.C1 nominal class C.C1 a where + type role C.F nominal data family C.F a -- Defined at T5417a.hs:5:5 data C.F (B1 a) -- Defined at T5417.hs:8:10 diff --git a/testsuite/tests/ghci/scripts/T7939.stdout b/testsuite/tests/ghci/scripts/T7939.stdout index 9a88b5c294..bfaf58fabe 100644 --- a/testsuite/tests/ghci/scripts/T7939.stdout +++ b/testsuite/tests/ghci/scripts/T7939.stdout @@ -1,21 +1,31 @@ +type role Foo nominal class Foo (a :: k) where + type role Bar nominal nominal type family Bar (a :: k) b :: * -- Defined at T7939.hs:6:4 Bar :: k -> * -> * -type family F a :: * -- Defined at T7939.hs:8:1 +type role F nominal +type family F a :: * + -- Defined at T7939.hs:8:1 type instance F Int -- Defined at T7939.hs:9:1 F :: * -> * -type family G a :: * where G Int = Bool +type role G nominal +type family G a :: * where + G Int = Bool -- Defined at T7939.hs:11:1 G :: * -> * -type family H (a :: Bool) :: Bool where H 'False = 'True +type role H nominal +type family H (a :: Bool) :: Bool where + H 'False = 'True -- Defined at T7939.hs:14:1 H :: Bool -> Bool +type role J nominal type family J (a :: [k]) :: Bool where J '[] = 'False J (h : t) = 'True -- Defined at T7939.hs:17:1 J :: [k] -> Bool +type role K nominal type family K (a :: [k]) :: Maybe k where K '[] = 'Nothing K (h : t) = 'Just h diff --git a/testsuite/tests/ghci/scripts/ghci025.stdout b/testsuite/tests/ghci/scripts/ghci025.stdout index 9308dd3f39..01b543e9e3 100644 --- a/testsuite/tests/ghci/scripts/ghci025.stdout +++ b/testsuite/tests/ghci/scripts/ghci025.stdout @@ -2,7 +2,9 @@ :browse! *T -- defined locally T.length :: T.Integer +type role N phantom class N a +type role S phantom class S a class C a b where c1 :: N b => a -> b @@ -60,7 +62,9 @@ T.length :: Data.ByteString.Internal.ByteString -> GHC.Types.Int :browse! T -- defined locally T.length :: T.Integer +type role N phantom class N a +type role S phantom class S a class C a b where c1 :: N b => a -> b @@ -74,7 +78,9 @@ c4 :: C a b => forall a1. a1 -> b :browse! T -- with -fprint-explicit-foralls -- defined locally T.length :: T.Integer +type role N phantom class N a +type role S phantom class S a class C a b where c1 :: N b => a -> b diff --git a/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr b/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr index dfbb7dc142..58121dcf9d 100644 --- a/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr +++ b/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr @@ -2,23 +2,32 @@ ClosedFam3.hs-boot:5:1: Type constructor ‛Foo’ has conflicting definitions in the module and its hs-boot file - Main module: type family Foo a :: * where + Main module: type role Foo nominal + type family Foo a :: * where Foo Int = Bool Foo Double = Char - Boot file: type family Foo a :: * where Foo Int = Bool + Boot file: type role Foo nominal + type family Foo a :: * where + Foo Int = Bool ClosedFam3.hs-boot:8:1: Type constructor ‛Bar’ has conflicting definitions in the module and its hs-boot file - Main module: type family Bar a :: * where + Main module: type role Bar nominal + type family Bar a :: * where Bar Int = Bool Bar Double = Double - Boot file: type family Bar a :: * where + Boot file: type role Bar nominal + type family Bar a :: * where Bar Int = Bool Bar Double = Char ClosedFam3.hs-boot:12:1: Type constructor ‛Baz’ has conflicting definitions in the module and its hs-boot file - Main module: type family Baz a :: * where Baz Int = Bool - Boot file: type family Baz (a :: k) :: * where Baz Int = Bool + Main module: type role Baz nominal + type family Baz a :: * where + Baz Int = Bool + Boot file: type role Baz nominal + type family Baz (a :: k) :: * where + Baz Int = Bool diff --git a/testsuite/tests/rename/should_fail/rnfail055.stderr b/testsuite/tests/rename/should_fail/rnfail055.stderr index e29472b7ce..3a3eb04b01 100644 --- a/testsuite/tests/rename/should_fail/rnfail055.stderr +++ b/testsuite/tests/rename/should_fail/rnfail055.stderr @@ -32,7 +32,8 @@ RnFail055.hs-boot:12:1: RnFail055.hs-boot:14:1: Type constructor ‛T2’ has conflicting definitions in the module and its hs-boot file - Main module: data Eq b => T2 a b = T2 a + Main module: type role T2 representational phantom + data Eq b => T2 a b = T2 a Boot file: data Eq a => T2 a b = T2 a RnFail055.hs-boot:16:11: @@ -56,7 +57,8 @@ RnFail055.hs-boot:23:1: RnFail055.hs-boot:25:1: Type constructor ‛T7’ has conflicting definitions in the module and its hs-boot file - Main module: data T7 a where + Main module: type role T7 phantom + data T7 a where T7 :: a -> T7 a Boot file: data T7 a = T7 a diff --git a/testsuite/tests/roles/should_fail/Roles12.stderr b/testsuite/tests/roles/should_fail/Roles12.stderr index 94f31f37f2..fd986b66fc 100644 --- a/testsuite/tests/roles/should_fail/Roles12.stderr +++ b/testsuite/tests/roles/should_fail/Roles12.stderr @@ -2,14 +2,6 @@ Roles12.hs:5:1: Type constructor ‛T’ has conflicting definitions in the module and its hs-boot file - Main module: data T a - No C type associated - Roles: [phantom] - RecFlag Recursive, Promotable - = - FamilyInstance: none - Boot file: abstract(False) T a - No C type associated - Roles: [representational] - RecFlag NonRecursive, Not promotable - FamilyInstance: none + Main module: type role T phantom + data T a + Boot file: data T a diff --git a/testsuite/tests/typecheck/should_fail/T3468.stderr b/testsuite/tests/typecheck/should_fail/T3468.stderr index 812e450928..010d673e4d 100644 --- a/testsuite/tests/typecheck/should_fail/T3468.stderr +++ b/testsuite/tests/typecheck/should_fail/T3468.stderr @@ -2,6 +2,7 @@ T3468.hs-boot:3:1: Type constructor ‛Tool’ has conflicting definitions in the module and its hs-boot file - Main module: data Tool d where + Main module: type role Tool phantom + data Tool d where F :: a -> Tool d Boot file: data Tool |