[GHC] #10663: ghci ignores stuff after an import command and a semicolon
GHC
ghc-devs at haskell.org
Fri Jul 24 02:00:05 UTC 2015
#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 Revisions:
-------------------------------------+-------------------------------------
Changes (by osa1):
* cc: osa1 (added)
Comment:
I'm trying to understand expected syntax here. It seems like I can only
put expressions after the first semicolon, other GHCi commands don't work:
{{{
λ:6> import Data.List; x; x + y
λ:7> import Data.List; import Data.Char
<no location info>: parse error in import declaration
λ:8> let x = 10
λ:9> x; x; x
<interactive>:9:2: parse error on input ‘;’
λ:10> let y = 10; y
<interactive>:10:14:
parse error (possibly incorrect indentation or mismatched brackets)
λ:11> import Data.Char; x
λ:12>
}}}
Also, I can't see anything related with semicolons in user manual "Using
GHCi"
section(https://downloads.haskell.org/~ghc/latest/docs/html/users_guide
/interactive-evaluation.html) so it seems to me like this semicolon
behavior is not intended and just a side effect of the used parser.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10663#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list