summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci.debugger
diff options
context:
space:
mode:
authorRoland Senn <rsx@bluewin.ch>2021-05-19 11:29:43 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-20 11:37:32 -0400
commit7c066734705048edb5b5b0afc30acea0805ec18d (patch)
tree00f8aaa41d280e3c9084a15395ec259f43b6c80f /testsuite/tests/ghci.debugger
parent43139064a95220cfa8b633840a76eb75d5affd0d (diff)
downloadhaskell-7c066734705048edb5b5b0afc30acea0805ec18d.tar.gz
Use pprSigmaType to print GHCi debugger Suspension Terms (Fix #19355)
In the GHCi debugger use the function `pprSigmaType` to print out Suspension Terms. The function `pprSigmaType` respect the flag `-f(no-)print-explicit-foralls` and so it fixes #19355. Switch back output of existing tests to default mode (no explicit foralls).
Diffstat (limited to 'testsuite/tests/ghci.debugger')
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T19355.script6
-rw-r--r--testsuite/tests/ghci.debugger/scripts/T19355.stdout8
-rw-r--r--testsuite/tests/ghci.debugger/scripts/all.T1
-rw-r--r--testsuite/tests/ghci.debugger/scripts/break012.stdout2
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print027.stdout12
-rw-r--r--testsuite/tests/ghci.debugger/scripts/print033.stdout2
6 files changed, 23 insertions, 8 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/T19355.script b/testsuite/tests/ghci.debugger/scripts/T19355.script
new file mode 100644
index 0000000000..3bbac17bda
--- /dev/null
+++ b/testsuite/tests/ghci.debugger/scripts/T19355.script
@@ -0,0 +1,6 @@
+:print fmap
+:set -fprint-explicit-foralls
+:print fmap
+:print (<*>)
+:set -fno-print-explicit-foralls
+:print (<*>)
diff --git a/testsuite/tests/ghci.debugger/scripts/T19355.stdout b/testsuite/tests/ghci.debugger/scripts/T19355.stdout
new file mode 100644
index 0000000000..6c03a221f5
--- /dev/null
+++ b/testsuite/tests/ghci.debugger/scripts/T19355.stdout
@@ -0,0 +1,8 @@
+fmap = (_t1::Functor f => (a -> b) -> f a -> f b)
+fmap = (_t2::forall (f :: * -> *) a b.
+ Functor f =>
+ (a -> b) -> f a -> f b)
+<*> = (_t3::forall (f :: * -> *) a b.
+ Applicative f =>
+ f (a -> b) -> f a -> f b)
+<*> = (_t4::Applicative f => f (a -> b) -> f a -> f b)
diff --git a/testsuite/tests/ghci.debugger/scripts/all.T b/testsuite/tests/ghci.debugger/scripts/all.T
index d6de0b3151..8e50e6b35f 100644
--- a/testsuite/tests/ghci.debugger/scripts/all.T
+++ b/testsuite/tests/ghci.debugger/scripts/all.T
@@ -127,3 +127,4 @@ test('break029', extra_files(['break029.hs']), ghci_script, ['break029.script'])
test('T2215', normal, ghci_script, ['T2215.script'])
test('T17989', normal, ghci_script, ['T17989.script'])
test('T19157', normal, ghci_script, ['T19157.script'])
+test('T19355', normal, ghci_script, ['T19355.script'])
diff --git a/testsuite/tests/ghci.debugger/scripts/break012.stdout b/testsuite/tests/ghci.debugger/scripts/break012.stdout
index 0726b3357d..5d478ae04e 100644
--- a/testsuite/tests/ghci.debugger/scripts/break012.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/break012.stdout
@@ -9,6 +9,6 @@ b :: a3 -> a3
c :: ()
d :: a -> a -> a
a = (_t1::a1)
-b = (_t2::forall {a3}. a3 -> a3)
+b = (_t2::a3 -> a3)
c = (_t3::())
d = (_t4::a -> a -> a)
diff --git a/testsuite/tests/ghci.debugger/scripts/print027.stdout b/testsuite/tests/ghci.debugger/scripts/print027.stdout
index 38c46a9118..9426ba8365 100644
--- a/testsuite/tests/ghci.debugger/scripts/print027.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print027.stdout
@@ -1,6 +1,6 @@
-+ = (_t1::forall a. Num a => a -> a -> a)
-print = (_t2::forall a. Show a => a -> IO ())
-log = (_t3::forall a. Floating a => a -> a)
-head = (_t4::forall a. [a] -> a)
-tail = (_t5::forall a. [a] -> [a])
-fst = (_t6::forall a b. (a, b) -> a)
++ = (_t1::Num a => a -> a -> a)
+print = (_t2::Show a => a -> IO ())
+log = (_t3::Floating a => a -> a)
+head = (_t4::[a] -> a)
+tail = (_t5::[a] -> [a])
+fst = (_t6::(a, b) -> a)
diff --git a/testsuite/tests/ghci.debugger/scripts/print033.stdout b/testsuite/tests/ghci.debugger/scripts/print033.stdout
index 0e5780318e..62b39bbaea 100644
--- a/testsuite/tests/ghci.debugger/scripts/print033.stdout
+++ b/testsuite/tests/ghci.debugger/scripts/print033.stdout
@@ -1 +1 @@
-u = (_t1::forall {s} {a}. ST s (forall s'. ST s' a))
+u = (_t1::ST s (forall s'. ST s' a))