#7962: "ghc -e <invalid expression>" should return non-zero exit status
----------------------------+-----------------------------------------------
Reporter:  timmaxw          |          Owner:                  
    Type:  feature request  |         Status:  new             
Priority:  normal           |      Component:  GHCi            
 Version:  7.6.2            |       Keywords:                  
      Os:  Linux            |   Architecture:  Unknown/Multiple
 Failure:  Other            |      Blockedby:                  
Blocking:                   |        Related:                  
----------------------------+-----------------------------------------------

Comment(by Fuuzetsu):

 GHC does what it was expected to do successfully. If it was to throw a
 non-zero code, it would indicate that there's something wrong with our
 usage of GHC or that it had some kind of other issue (and in fact we get
 ‘1’ when we try to compile a non-existent file).

 GHC -e executes successfully and therefore exits with 0. It couldn't
 really care less about what happens during the session. For scripting, you
 probably want to write a Haskell program that does what you want and if it
 fails, throw whatever error code you want. It just isn't GHCs place to
 decide what it considers successful inside the session. Just my 2 cents.

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

_______________________________________________
ghc-tickets mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-tickets

Reply via email to