From 8c63880f82b7f93cbdf9dab7672fe2eea48e9ee3 Mon Sep 17 00:00:00 2001 From: Benjamin Koch <snowball@c3pb.de> Date: Sun, 13 Dec 2020 04:04:21 +0100 Subject: [PATCH] Add scripts for running ghci and ghcid ghci needs some convincing to work with a custom prelude. Therefore, we cannot use `stack ghci`. --- load-all.ghci | 7 +++++++ run-ghci.sh | 4 ++++ run-ghcid.sh | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 load-all.ghci create mode 100755 run-ghci.sh create mode 100755 run-ghcid.sh diff --git a/load-all.ghci b/load-all.ghci new file mode 100644 index 0000000..5e904b2 --- /dev/null +++ b/load-all.ghci @@ -0,0 +1,7 @@ +:set -isrc -XOverloadedStrings -XNamedFieldPuns -XLambdaCase -XMultiWayIf -XScopedTypeVariables + +:set -XNoImplicitPrelude +:load src/Prelude.hs +:set -XImplicitPrelude + +:load src/QBar/Cli.hs diff --git a/run-ghci.sh b/run-ghci.sh new file mode 100755 index 0000000..ea18fa0 --- /dev/null +++ b/run-ghci.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -e +# see https://gitlab.haskell.org/ghc/ghc/-/issues/10920 +stack exec -- ghci -ghci-script load-all.ghci diff --git a/run-ghcid.sh b/run-ghcid.sh new file mode 100755 index 0000000..c1bc375 --- /dev/null +++ b/run-ghcid.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -e +stack exec -- ghcid -c "ghci -ghci-script load-all.ghci" -- GitLab