Fix #12906: GHC fails to typecheck Main module without main
authorRoland Senn <rsx@bluewin.ch>
Sat, 17 Nov 2018 11:24:27 +0000 (12:24 +0100)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Sat, 17 Nov 2018 12:52:20 +0000 (13:52 +0100)
commit92f81841e885f081bbb079d0dca6eb50b9043d4b
tree57e370334d9c9b7220a402de89f73dfbd80ce357
parent921fd890abe0e7267962c9439098b03c94ebdb9b
Fix #12906: GHC fails to typecheck Main module without main

Summary: The function fail is no longer called immediately
after adding the no-main error message to the TcM monad.
The rest of the module will be typechecked.

Test Plan: make test TEST=T12906

Reviewers: dfeuer, RyanGlScott, ezyang, mpickering, bgamari

Reviewed By: RyanGlScott

Subscribers: rwbarton, carter

GHC Trac Issues: #12906

Differential Revision: https://phabricator.haskell.org/D5338
compiler/typecheck/TcRnDriver.hs
testsuite/tests/typecheck/should_fail/T12906.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T12906.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T