summaryrefslogtreecommitdiff
path: root/hadrian/ghci-stack.in
blob: 12f388820590c0025d1267b1a099d7929e63c42e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env sh

# This file is generated by configure from ghci-stack.in

set -e

export TOOL_OUTPUT=.hadrian_ghci/ghci_args
TERM=dumb CABFLAGS=-v0 "hadrian/build-cabal" tool:compiler/GHC.hs -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci $HADRIAN_ARGS

# Replace newlines with spaces, as these otherwise break the ghci invocation on windows.
GHC_FLAGS="$GHC_FLAGS $(cat $TOOL_OUTPUT | tr '\n\r' ' ')"
stack exec -- @WithGhc@ --interactive $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 +RTS -A128m