[GHC] #7962: "ghc -e <invalid expression>" should return non-zero exit status

GHC ghc-devs at haskell.org
Wed Nov 27 05:22:54 UTC 2013


#7962: "ghc -e <invalid expression>" should return non-zero exit status
------------------------------------+------------------------------------
        Reporter:  timmaxw          |            Owner:
            Type:  feature request  |           Status:  new
        Priority:  normal           |        Milestone:
       Component:  GHCi             |          Version:  7.6.2
      Resolution:                   |         Keywords:
Operating System:  Linux            |     Architecture:  Unknown/Multiple
 Type of failure:  Other            |       Difficulty:  Unknown
       Test Case:                   |       Blocked By:
        Blocking:                   |  Related Tickets:
------------------------------------+------------------------------------
Changes (by khyperia):

 * cc: hvr (added)


Comment:

 Attempting to take this on as my first ticket, ran into a couple problems.
 Essentially, using -e eventually calls into code common between GHCi and
 -e.

 All the code for the following is in `ghc/InteractiveUI.hs`

 Relevant control enters in runGHCi, in the `case maybe_exprs` block. Both
 cases of the block (one with -e arguments, the other with normal
 interpreting) then call `runCommands`, which eventually filters down to
 `GhciMonad.runStmt`, which eventually handles the source errors.

 I am unsure of where to insert the logic to return a nonzero exit code, as
 putting it in `GhciMonad`/related would also affect normal GHCi.

 Any tips?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7962#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list