summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2019-10-21 14:57:01 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-24 08:46:19 -0400
commit6824f29aebd28571db118eb6877ef04eda630871 (patch)
tree4a30df6ac47e1d31af32f28ce59d7773fd876be9 /testsuite/tests/ghci
parent83655b06e6d3e93b2d15bb0fa250fbb113d7fe68 (diff)
downloadhaskell-6824f29aebd28571db118eb6877ef04eda630871.tar.gz
Parenthesize GADT return types in pprIfaceConDecl (#17384)
We were using `pprIfaceAppArgs` instead of `pprParendIfaceAppArgs` in `pprIfaceConDecl`. Oops. Fixes #17384.
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r--testsuite/tests/ghci/scripts/T17384.hs8
-rw-r--r--testsuite/tests/ghci/scripts/T17384.script2
-rw-r--r--testsuite/tests/ghci/scripts/T17384.stdout5
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T1
4 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T17384.hs b/testsuite/tests/ghci/scripts/T17384.hs
new file mode 100644
index 0000000000..ce9216b59f
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T17384.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE GADTs #-}
+{-# LANGUAGE KindSignatures #-}
+module T17384 where
+
+import Data.Kind
+
+data T :: Type -> Type where
+ MkT :: T (Maybe Bool)
diff --git a/testsuite/tests/ghci/scripts/T17384.script b/testsuite/tests/ghci/scripts/T17384.script
new file mode 100644
index 0000000000..7274d86aaf
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T17384.script
@@ -0,0 +1,2 @@
+:load T17384
+:info T
diff --git a/testsuite/tests/ghci/scripts/T17384.stdout b/testsuite/tests/ghci/scripts/T17384.stdout
new file mode 100644
index 0000000000..c610cc5826
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T17384.stdout
@@ -0,0 +1,5 @@
+type role T nominal
+type T :: * -> *
+data T a where
+ MkT :: T (Maybe Bool)
+ -- Defined at T17384.hs:7:1
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 96c63149fb..96ca2eba24 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -312,3 +312,4 @@ test('T16804', extra_files(['T16804a.hs', 'T16804b.hs', 'T16804c.hs']), ghci_scr
test('T15546', normal, ghci_script, ['T15546.script'])
test('T16876', normal, ghci_script, ['T16876.script'])
test('T17345', normal, ghci_script, ['T17345.script'])
+test('T17384', normal, ghci_script, ['T17384.script'])