From 4edffcbba6c4ff80b02a5e566a0622622baeaa1f Mon Sep 17 00:00:00 2001 From: Andreas Klebinger Date: Mon, 30 Mar 2020 17:13:30 +0200 Subject: Turn newlines into spaces for hadrian/ghci. The newlines break the command on windows. --- hadrian/ghci-cabal | 3 ++- hadrian/ghci-stack | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hadrian/ghci-cabal b/hadrian/ghci-cabal index 93343e4e28..2ee70427c3 100755 --- a/hadrian/ghci-cabal +++ b/hadrian/ghci-cabal @@ -2,5 +2,6 @@ set -e -GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-cabal" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")" +# Replace newlines with spaces, as these otherwise break the ghci invocation on windows. +GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-cabal" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@" | tr '\n\r' ' ')" ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m diff --git a/hadrian/ghci-stack b/hadrian/ghci-stack index 3c850cdac8..92b5229328 100755 --- a/hadrian/ghci-stack +++ b/hadrian/ghci-stack @@ -2,5 +2,6 @@ set -e -GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-stack" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")" +# Replace newlines with spaces, as these otherwise break the ghci invocation on windows. +GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-stack" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@" | tr '\n\r' ' ')" stack exec -- ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m -- cgit v1.2.1