summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2020-08-04 20:27:06 +0300
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-06 13:34:06 -0400
commit0ddb43848b9fc24f5404915f57dc504546e68292 (patch)
treec97286389bd66c683304c483d3a99f081eb216d7 /testsuite/tests/polykinds
parent826d07db0e0f31fe2b2d2e0661be7f0cb3cde3c7 (diff)
downloadhaskell-0ddb43848b9fc24f5404915f57dc504546e68292.tar.gz
Fix visible forall in ppr_ty (#18522)
Before this patch, this type: T :: forall k -> (k ~ k) => forall j -> k -> j -> Type was printed incorrectly as: T :: forall k j -> (k ~ k) => k -> j -> Type
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r--testsuite/tests/polykinds/T18522-ppr.script4
-rw-r--r--testsuite/tests/polykinds/T18522-ppr.stdout1
-rw-r--r--testsuite/tests/polykinds/all.T1
3 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T18522-ppr.script b/testsuite/tests/polykinds/T18522-ppr.script
new file mode 100644
index 0000000000..54d3619c6e
--- /dev/null
+++ b/testsuite/tests/polykinds/T18522-ppr.script
@@ -0,0 +1,4 @@
+:set -XPolyKinds -XDataKinds -XRankNTypes -XTypeFamilies
+import Data.Kind (Type)
+type family T :: forall k -> (k ~ k) => forall j -> k -> j -> Type
+:k T
diff --git a/testsuite/tests/polykinds/T18522-ppr.stdout b/testsuite/tests/polykinds/T18522-ppr.stdout
new file mode 100644
index 0000000000..241530bbed
--- /dev/null
+++ b/testsuite/tests/polykinds/T18522-ppr.stdout
@@ -0,0 +1 @@
+T :: forall k -> (k ~ k) => forall j -> k -> j -> *
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 436bb9dbce..68bf260e64 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -223,3 +223,4 @@ test('T18300', normal, compile_fail, [''])
test('T18451', normal, compile_fail, [''])
test('T18451a', normal, compile_fail, [''])
test('T18451b', normal, compile_fail, [''])
+test('T18522-ppr', normal, ghci_script, ['T18522-ppr.script'])