summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci
diff options
context:
space:
mode:
authornineonine <mail4chemik@gmail.com>2022-02-10 00:10:19 -0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-02-16 05:29:08 -0500
commit316312ecd12831f22bd8f7a8aa229c045bbbbedc (patch)
tree46a0257f83434eadd364a89a12ff313a5264a965 /testsuite/tests/ghci
parent74bf9bb5b83e5ff335847fc2e1d3def413e7df90 (diff)
downloadhaskell-316312ecd12831f22bd8f7a8aa229c045bbbbedc.tar.gz
ghci: fix -ddump-stg-cg (#21052)
The pre-codegen Stg AST dump was not available in ghci because it was performed in 'doCodeGen'. This was now moved to 'coreToStg' area.
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r--testsuite/tests/ghci/should_run/T21052.script4
-rw-r--r--testsuite/tests/ghci/should_run/T21052.stdout10
-rw-r--r--testsuite/tests/ghci/should_run/all.T1
3 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/should_run/T21052.script b/testsuite/tests/ghci/should_run/T21052.script
new file mode 100644
index 0000000000..ad373c82cb
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T21052.script
@@ -0,0 +1,4 @@
+:set -ddump-stg-cg
+:set -dsuppress-uniques
+
+foo = ()
diff --git a/testsuite/tests/ghci/should_run/T21052.stdout b/testsuite/tests/ghci/should_run/T21052.stdout
new file mode 100644
index 0000000000..1fee75de62
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T21052.stdout
@@ -0,0 +1,10 @@
+
+==================== CodeGenInput STG: ====================
+BCO_toplevel :: GHC.Types.IO [()]
+[LclId] =
+ {} \u []
+ let {
+ sat :: [()]
+ [LclId] =
+ CCCS :! [GHC.Tuple.() GHC.Types.[]];
+ } in GHC.Base.returnIO sat;
diff --git a/testsuite/tests/ghci/should_run/all.T b/testsuite/tests/ghci/should_run/all.T
index 4b4b151963..77c17a995c 100644
--- a/testsuite/tests/ghci/should_run/all.T
+++ b/testsuite/tests/ghci/should_run/all.T
@@ -81,3 +81,4 @@ test('T19460', just_ghci, ghci_script, ['T19460.script'])
test('T19733', just_ghci, compile_and_run, [''])
test('T19628', [extra_files(['T19628a.hs']), only_ways(['ghci']) ], compile_and_run, [''])
+test('T21052', just_ghci, ghci_script, ['T21052.script'])