
#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 Keywords: newcomer | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC accepts Unknown/Multiple | invalid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- I can put a semicolon and then an expression or declaration after an import command in ghci, and the expression or declaration is simply ignored. {{{ rwbarton@morphism:~/ghc$ ghci-7.10.1 GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help Prelude> import Data.List; x Prelude Data.List> }}} The stuff after the semicolon does have to parse, but then is discarded. Pretty confusing. It's especially confusing when using `ghc -e` {{{ rwbarton@morphism:~/ghc$ ghc-7.10.1 -e "import Data.List; sort [2,1]" rwbarton@morphism:~/ghc$ echo $? 0 }}} The command is wrong (in general you cannot give multiple commands separated by semicolons, you must use multiple `-e` options), but GHC fails to complain in any way and silently ignores the "second command". -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10663 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler