summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-01-07 11:39:19 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-01-11 19:43:57 -0500
commit833216a31c866d86ff95cfbf95591fb56463371c (patch)
treec1207669ca0c024b3f517a197a1313d81ee8437a /testsuite/tests
parent23d215fcb62c8bfe8d56396a0c9718a72ac0037b (diff)
downloadhaskell-833216a31c866d86ff95cfbf95591fb56463371c.tar.gz
Use interactive flags when printing expressions in GHCi
The documentation states that the interactive flags should be use for any interactive expressions. The interactive flags are used when typechecking these expressions but not when printing. The session flags (modified by :set) are only used when loading a module. Fixes #20909
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/ghci/scripts/T20909.script3
-rw-r--r--testsuite/tests/ghci/scripts/T20909.stdout1
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T1
3 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/scripts/T20909.script b/testsuite/tests/ghci/scripts/T20909.script
new file mode 100644
index 0000000000..8cd302b33e
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T20909.script
@@ -0,0 +1,3 @@
+:seti -fprint-explicit-foralls
+:type id
+
diff --git a/testsuite/tests/ghci/scripts/T20909.stdout b/testsuite/tests/ghci/scripts/T20909.stdout
new file mode 100644
index 0000000000..f2bad173c8
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T20909.stdout
@@ -0,0 +1 @@
+id :: forall a. a -> a
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 5cdbd8a21c..5e9aea056d 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -353,3 +353,4 @@ test('T20473a', normal, ghci_script, ['T20473a.script'])
test('T20473b', normal, ghci_script, ['T20473b.script'])
test('T20587', [extra_files(['../shell.hs'])], ghci_script,
['T20587.script'])
+test('T20909', normal, ghci_script, ['T20909.script'])