diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2018-12-07 14:25:30 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2018-12-07 14:44:26 +0000 |
commit | 5b7ca03995c1d5fbd29ba0e327bb2a1f344c9419 (patch) | |
tree | 24d1d51df1ea68c0216d532cf3edac4639dcfcb7 /testsuite/tests/roles | |
parent | eee1b61f85d949aa7c4bc496b5579cf759d1861e (diff) | |
download | haskell-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/tests/roles')
6 files changed, 36 insertions, 36 deletions
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 |