[commit: ghc] wip/ghc-in-ghci-qol: Refactor ./hadrian/ghci.sh for better error messages (8f37f37)

git at git.haskell.org git at git.haskell.org
Wed Mar 20 15:27:39 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/ghc-in-ghci-qol
Link       : http://ghc.haskell.org/trac/ghc/changeset/8f37f3732e5d538449cbca748d6672f517b3c5a7/ghc

>---------------------------------------------------------------

commit 8f37f3732e5d538449cbca748d6672f517b3c5a7
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Wed Mar 20 14:12:53 2019 +0000

    Refactor ./hadrian/ghci.sh for better error messages
    
    By separating these two lines, if the first command fails then `ghci` is
    not loaded. Before it would still load ghci but display lots of errors
    about not being able to find modules.


>---------------------------------------------------------------

8f37f3732e5d538449cbca748d6672f517b3c5a7
 hadrian/ghci.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hadrian/ghci.sh b/hadrian/ghci.sh
index 4a70946..4c9b9c6 100755
--- a/hadrian/ghci.sh
+++ b/hadrian/ghci.sh
@@ -1,3 +1,6 @@
 #!/usr/bin/env bash
 
-ghci $(TERM=dumb CABFLAGS=-v0 . "hadrian/build.cabal.sh" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@") -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs
+set -e
+
+GHC_FLAGS=$(TERM=dumb CABFLAGS=-v0 . "hadrian/build.cabal.sh" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")
+ghci $GHC_FLAGS -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs



More information about the ghc-commits mailing list