summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2018-07-05 08:52:20 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2018-07-05 09:51:15 -0400
commitdbdcacfc55f28d8a85484cc1cf13dd78c45bf7ee (patch)
tree5f063405fccb5080f94d1dfdec33f65b98b3ba91 /testsuite
parentb6a3386186b77333b7a6cdc163499d7dae0dad1c (diff)
downloadhaskell-dbdcacfc55f28d8a85484cc1cf13dd78c45bf7ee.tar.gz
Make ppr_tc_args aware of -fprint-explicit-kinds
Summary: `ppr_tc_args` was printing invisible kind arguments even when `-fprint-explicit-kinds` wasn't enabled. Easily fixed. Test Plan: make test TEST=T15341 Reviewers: goldfire, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie, carter GHC Trac Issues: #15341 Differential Revision: https://phabricator.haskell.org/D4932
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/ghci/scripts/T15341.hs6
-rw-r--r--testsuite/tests/ghci/scripts/T15341.script4
-rw-r--r--testsuite/tests/ghci/scripts/T15341.stdout6
-rw-r--r--testsuite/tests/ghci/scripts/T7939.stdout8
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T1
-rw-r--r--testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr2
6 files changed, 22 insertions, 5 deletions
diff --git a/testsuite/tests/ghci/scripts/T15341.hs b/testsuite/tests/ghci/scripts/T15341.hs
new file mode 100644
index 0000000000..b84c1bbe10
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15341.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE TypeFamilies #-}
+module T15341 where
+
+type family Foo (a :: k) :: k where
+ Foo a = a
diff --git a/testsuite/tests/ghci/scripts/T15341.script b/testsuite/tests/ghci/scripts/T15341.script
new file mode 100644
index 0000000000..0a3ffdc5d3
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15341.script
@@ -0,0 +1,4 @@
+:load T15341.hs
+:info Foo
+:set -fprint-explicit-kinds
+:info Foo
diff --git a/testsuite/tests/ghci/scripts/T15341.stdout b/testsuite/tests/ghci/scripts/T15341.stdout
new file mode 100644
index 0000000000..1d29dc7f8f
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15341.stdout
@@ -0,0 +1,6 @@
+type family Foo (a :: k) :: k
+ where Foo a = a
+ -- Defined at T15341.hs:5:1
+type family Foo k (a :: k) :: k
+ where Foo k a = a
+ -- Defined at T15341.hs:5:1
diff --git a/testsuite/tests/ghci/scripts/T7939.stdout b/testsuite/tests/ghci/scripts/T7939.stdout
index db2590c930..82a8658906 100644
--- a/testsuite/tests/ghci/scripts/T7939.stdout
+++ b/testsuite/tests/ghci/scripts/T7939.stdout
@@ -15,13 +15,13 @@ type family H (a :: Bool) :: Bool
H :: Bool -> Bool
type family J (a :: [k]) :: Bool
where
- J k '[] = 'False
- J k (h : t) = 'True
+ J '[] = 'False
+ J (h : t) = 'True
-- Defined at T7939.hs:17:1
J :: [k] -> Bool
type family K (a1 :: [a]) :: Maybe a
where
- K a '[] = 'Nothing
- K a (h : t) = 'Just h
+ K '[] = 'Nothing
+ K (h : t) = 'Just h
-- Defined at T7939.hs:21:1
K :: [a] -> Maybe a
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 29fbdf85c5..89545949c6 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -269,3 +269,4 @@ test('T14676', extra_files(['../prog002']), ghci_script, ['T14676.script'])
test('T14796', normal, ghci_script, ['T14796.script'])
test('T14969', normal, ghci_script, ['T14969.script'])
test('T15259', normal, ghci_script, ['T15259.script'])
+test('T15341', normal, ghci_script, ['T15341.script'])
diff --git a/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr b/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr
index ba1f46ef47..cab50784e1 100644
--- a/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr
+++ b/testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr
@@ -27,5 +27,5 @@ ClosedFam3.hs-boot:12:1: error:
Main module: type family Baz a :: *
where Baz Int = Bool
Boot file: type family Baz (a :: k) :: *
- where Baz * Int = Bool
+ where Baz Int = Bool
The types have different kinds