summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver/fat-iface/T22405/Main.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-11-09 12:17:57 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-02 19:46:43 -0500
commit85ecc1a0fd6536149ae2b54f4b1985d80c0e21cb (patch)
treecc2b165d482960a7251e8e4bb494b8392f40dd50 /testsuite/tests/driver/fat-iface/T22405/Main.hs
parent74c767df770766d8d52e87b9ff7da10f94620a91 (diff)
downloadhaskell-85ecc1a0fd6536149ae2b54f4b1985d80c0e21cb.tar.gz
Add special case for :Main module in `GHC.IfaceToCore.mk_top_id`
See Note [Root-main Id] The `:Main` special binding is actually defined in the current module (hence don't go looking for it externally) but the module name is rOOT_MAIN rather than the current module so we need this special case. There was already some similar logic in `GHC.Rename.Env` for External Core, but now the "External Core" is in interface files it needs to be moved here instead. Fixes #22405
Diffstat (limited to 'testsuite/tests/driver/fat-iface/T22405/Main.hs')
-rw-r--r--testsuite/tests/driver/fat-iface/T22405/Main.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/tests/driver/fat-iface/T22405/Main.hs b/testsuite/tests/driver/fat-iface/T22405/Main.hs
new file mode 100644
index 0000000000..d82a4bd93b
--- /dev/null
+++ b/testsuite/tests/driver/fat-iface/T22405/Main.hs
@@ -0,0 +1,4 @@
+module Main where
+
+main :: IO ()
+main = return ()