summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorchessai <chessai1996@gmail.com>2018-10-02 14:46:08 +0200
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>2018-10-02 16:00:19 +0200
commitabfb91fb0ea27eb618f297b1d3ba60cfa021afe0 (patch)
treef35b012fb723e44c015a97c69c128019755fd580 /testsuite
parentcaffff1238097821cd2879f7285010a6565afd52 (diff)
downloadhaskell-abfb91fb0ea27eb618f297b1d3ba60cfa021afe0.tar.gz
resolve T13704
Summary: allow -main-is to change export list for default module header, allowing one to change the entry point to one's program. Test Plan: ./validate Reviewers: bgamari, nomeata, mpickering Reviewed By: mpickering Subscribers: mpickering, rwbarton, carter GHC Trac Issues: #13704 Differential Revision: https://phabricator.haskell.org/D5189
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/module/T13704.hs3
-rw-r--r--testsuite/tests/module/all.T2
2 files changed, 4 insertions, 1 deletions
diff --git a/testsuite/tests/module/T13704.hs b/testsuite/tests/module/T13704.hs
new file mode 100644
index 0000000000..38b1cb73fc
--- /dev/null
+++ b/testsuite/tests/module/T13704.hs
@@ -0,0 +1,3 @@
+program = return ()
+
+-- meant to be compiled with 'ghc -main-is Main.program T13704.hs'
diff --git a/testsuite/tests/module/all.T b/testsuite/tests/module/all.T
index e862413897..dbba44f0ba 100644
--- a/testsuite/tests/module/all.T
+++ b/testsuite/tests/module/all.T
@@ -284,4 +284,4 @@ test('T11970B', normal, compile_fail, [''])
test('MultiExport', normal, compile, [''])
test('T13528', normal, compile, [''])
test('T13622', normal, compile, [''])
-
+test('T13704', normal, compile, ['-main-is Main.program'])