#10663: ghci ignores stuff after an import command and a semicolon -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.10.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts | Unknown/Multiple invalid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1726 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"a84c21ebaa5c56a222d69f245ef4daa77054fdcb/ghc" a84c21eb/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="a84c21ebaa5c56a222d69f245ef4daa77054fdcb" Reject import declaration with semicolon in GHCi Now GHCi rejects input containing an import declaration and semicolon, and prints an appropriate error message. Before, the stuff after an import declaration and semicolon got ignored (most of the time), without telling the user about it. As the default behaviour of GHCi is to reject multiple commands in a single input, we extend this behaviour to import commands. This patch fixes #10663. (See https://phabricator.haskell.org/D1518 for the introduction of `is_import` and `is_decl`.) Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1726 GHC Trac Issues: #10663 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10663#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler