diff options
author | Roland Senn <rsx@bluewin.ch> | 2020-03-14 17:33:02 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-03-25 14:45:04 -0400 |
commit | 703221f408b023a1b3433938572e7b5c24b4af60 (patch) | |
tree | 505a0b419f288b73d2034e96d4b7f398a7488733 /testsuite/tests/typecheck/should_fail/all.T | |
parent | 2643ba465cd2a133b6f495f34fc59cd1a6d23525 (diff) | |
download | haskell-703221f408b023a1b3433938572e7b5c24b4af60.tar.gz |
Use export list of Main module in function TcRnDriver.hs:check_main (Fix #16453)
- Provide the export list of the `Main` module as parameter to the
`compiler/typecheck/TcRnDriver.hs:check_main` function.
- Instead of `lookupOccRn_maybe` call the function `lookupInfoOccRn`.
It returns the list `mains_all` of all the main functions in scope.
- Select from this list `mains_all` all `main` functions that are in
the export list of the `Main` module.
- If this new list contains exactly one single `main` function, then
typechecking continues.
- Otherwise issue an appropriate error message.
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/all.T')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/all.T | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T index 60e50ca241..4f8f08ed85 100644 --- a/testsuite/tests/typecheck/should_fail/all.T +++ b/testsuite/tests/typecheck/should_fail/all.T @@ -516,6 +516,10 @@ test('T16255', normal, compile_fail, ['']) test('T16204c', normal, compile_fail, ['']) test('T16394', normal, compile_fail, ['']) test('T16414', normal, compile_fail, ['']) +test('T16453E1', extra_files(['T16453T.hs', 'T16453S.hs']), multimod_compile_fail, + ['T16453E1.hs', '-v0']) +test('T16453E2', extra_files(['T16453T.hs', 'T16453S.hs']), + multimod_compile_fail, ['T16453E2.hs', '-v0']) test('T16456', normal, compile_fail, ['-fprint-explicit-foralls']) test('T16627', normal, compile_fail, ['']) test('T502', normal, compile_fail, ['']) |