summaryrefslogtreecommitdiff
path: root/testsuite/tests/partial-sigs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-10-03 13:24:11 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2018-10-04 15:37:58 +0100
commite9e664022af66778bcc08f66ce3ba3b012c77ea4 (patch)
treea3980731457490ad2612d3966a70dad93e438528 /testsuite/tests/partial-sigs
parentbd7898537768f936d05c0c83eef1cd9b00933347 (diff)
downloadhaskell-e9e664022af66778bcc08f66ce3ba3b012c77ea4.tar.gz
Better -ddump-types
The debug flag -ddump-types is supposed to show the type of Ids, and the kinds of type constructors. It was doing the former but not the latter -- instead it was using showTyTying, which is actually less helpful when debugging. This patch changes it to print the kind and roles of the thing. I also made -ddump-types show pattern synonyms
Diffstat (limited to 'testsuite/tests/partial-sigs')
-rw-r--r--testsuite/tests/partial-sigs/should_compile/ADT.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr5
-rw-r--r--testsuite/tests/partial-sigs/should_compile/Meltdown.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr5
-rw-r--r--testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr6
-rw-r--r--testsuite/tests/partial-sigs/should_compile/SkipMany.stderr2
-rw-r--r--testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr3
7 files changed, 13 insertions, 12 deletions
diff --git a/testsuite/tests/partial-sigs/should_compile/ADT.stderr b/testsuite/tests/partial-sigs/should_compile/ADT.stderr
index ce0f93ac47..92e1bf59f5 100644
--- a/testsuite/tests/partial-sigs/should_compile/ADT.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/ADT.stderr
@@ -2,7 +2,7 @@ TYPE SIGNATURES
ADT.Foo :: forall x y z. x -> y -> z -> Foo x y z
bar :: Int -> Foo Bool () Int
TYPE CONSTRUCTORS
- data Foo x y z = Foo x y z
+ Foo :: * -> * -> * -> *
COERCION AXIOMS
Dependent modules: []
Dependent packages: [base-4.12.0.0, ghc-prim-0.5.3,
diff --git a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
index 4e0975eb3e..f3be34f69c 100644
--- a/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/DataFamilyInstanceLHS.stderr
@@ -11,8 +11,9 @@ TYPE SIGNATURES
DataFamilyInstanceLHS.R:SingMyKind_ _
foo :: Sing 'A
TYPE CONSTRUCTORS
- data MyKind = A | B
- data family Sing (a :: k)
+ MyKind :: *
+ type role Sing nominal nominal
+ Sing :: forall k. k -> *
COERCION AXIOMS
axiom DataFamilyInstanceLHS.D:R:SingMyKind_0 ::
Sing _ = DataFamilyInstanceLHS.R:SingMyKind_
diff --git a/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr b/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr
index 3dba495799..752ee4d53e 100644
--- a/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/Meltdown.stderr
@@ -5,7 +5,7 @@ TYPE SIGNATURES
NukeMonad param1 param2 () -> NukeMonad param1 param2 ()
TYPE CONSTRUCTORS
type role NukeMonad phantom phantom phantom
- data NukeMonad a b c
+ NukeMonad :: * -> * -> * -> *
COERCION AXIOMS
INSTANCES
instance Functor (NukeMonad a b) -- Defined at Meltdown.hs:8:10
diff --git a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr
index 8fae725e61..1c8a89ac04 100644
--- a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInDataFamilyInstanceLHS.stderr
@@ -10,8 +10,9 @@ TYPE SIGNATURES
(_a ~ 'B) =>
NamedWildcardInDataFamilyInstanceLHS.R:SingMyKind_a _a
TYPE CONSTRUCTORS
- data MyKind = A | B
- data family Sing (a :: k)
+ MyKind :: *
+ type role Sing nominal nominal
+ Sing :: forall k. k -> *
COERCION AXIOMS
axiom NamedWildcardInDataFamilyInstanceLHS.D:R:SingMyKind_a0 ::
Sing _a = NamedWildcardInDataFamilyInstanceLHS.R:SingMyKind_a
diff --git a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr
index 92785a75c4..bb3720ab0d 100644
--- a/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/NamedWildcardInTypeFamilyInstanceLHS.stderr
@@ -1,9 +1,7 @@
TYPE SIGNATURES
TYPE CONSTRUCTORS
- type family F a :: *
- where
- F _t = Int
- axiom NamedWildcardInTypeFamilyInstanceLHS.D:R:F
+ type role F nominal
+ F :: * -> *
COERCION AXIOMS
axiom NamedWildcardInTypeFamilyInstanceLHS.D:R:F ::
F _t = Int
diff --git a/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr b/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
index 5033a0c28f..3508652186 100644
--- a/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/SkipMany.stderr
@@ -6,7 +6,7 @@ TYPE SIGNATURES
skipMany' ::
forall tok st a. GenParser tok st a -> GenParser tok st ()
TYPE CONSTRUCTORS
- data GenParser tok st a = GenParser tok st a
+ GenParser :: * -> * -> * -> *
COERCION AXIOMS
Dependent modules: []
Dependent packages: [base-4.12.0.0, ghc-prim-0.5.3,
diff --git a/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr b/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
index 6e61c44ef1..1a783cba74 100644
--- a/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/TypeFamilyInstanceLHS.stderr
@@ -1,7 +1,8 @@
TYPE SIGNATURES
foo :: F Int Char -> Int
TYPE CONSTRUCTORS
- type family F a b :: * open
+ type role F nominal nominal
+ F :: * -> * -> *
COERCION AXIOMS
axiom TypeFamilyInstanceLHS.D:R:FBool_ ::
F Bool _ = Bool -- Defined at TypeFamilyInstanceLHS.hs:6:15