From 4e17878d01010e2537e618d101d1770c12d5fd70 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 10:32:24 -0400 Subject: [PATCH 01/21] Stub in a script to return the flags for ghci. --- script/ghci-flags | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 script/ghci-flags diff --git a/script/ghci-flags b/script/ghci-flags new file mode 100755 index 0000000000..51a80d9531 --- /dev/null +++ b/script/ghci-flags @@ -0,0 +1,2 @@ +#!/bin/bash +# Computes the flags for ghcide to pass to ghci. You probably won’t be running this yourself, but rather ghcide will via configuration in hie.yaml. From 35270bedde600fdb0276b688706cbaa9d3001566 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:01:17 -0400 Subject: [PATCH 02/21] Gather all the flags. --- script/ghci-flags | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/script/ghci-flags b/script/ghci-flags index 51a80d9531..f66c924344 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -1,2 +1,49 @@ #!/bin/bash # Computes the flags for ghcide to pass to ghci. You probably won’t be running this yourself, but rather ghcide will via configuration in hie.yaml. + +set -e + +cd $(dirname "$0")/.. + +root="$(pwd)" +ghc_version="$(ghc --numeric-version)" + +echo "--interactive" + +echo "-O0" +echo "-ignore-dot-ghci" + +echo "-i$root/dist-newstyle/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen" + +echo "-I$root/dist-newstyle/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen" + +echo "-i$root/semantic-analysis/src" +echo "-i$root/semantic-ast/src" +echo "-i$root/semantic-core/src" +echo "-i$root/semantic-java/src" +echo "-i$root/semantic-json/src" +echo "-i$root/semantic-python/src" +echo "-i$root/semantic-tags/src" +echo "-i$root/src" +echo "-i$root/bench" +echo "-i$root/test" + +echo "-optP-include" +echo "-optP$root/dist-newstyle/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen/cabal_macros.h" + +# Emit package flags from the environment file, removing comments & prefixing with - +cabal exec -v0 bash -- -c 'cat $GHC_ENVIRONMENT | grep -v "^--" | sed -e "s/^/-/"' + +echo "-XHaskell2010" + +echo "-Weverything" +echo "-Wno-all-missed-specialisations" +echo "-Wno-implicit-prelude" +echo "-Wno-missed-specialisations" +echo "-Wno-missing-import-lists" +echo "-Wno-missing-local-signatures" +echo "-Wno-monomorphism-restriction" +echo "-Wno-name-shadowing" +echo "-Wno-safe" +echo "-Wno-unsafe" +echo "-Wno-star-is-type" From ddff669740967ba854d4b7705c5dd025df295b66 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:02:44 -0400 Subject: [PATCH 03/21] Run the rest of it out of the cabal exec. --- script/ghci-flags | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/ghci-flags b/script/ghci-flags index f66c924344..a99d20aa67 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -32,7 +32,7 @@ echo "-optP-include" echo "-optP$root/dist-newstyle/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen/cabal_macros.h" # Emit package flags from the environment file, removing comments & prefixing with - -cabal exec -v0 bash -- -c 'cat $GHC_ENVIRONMENT | grep -v "^--" | sed -e "s/^/-/"' +cabal exec -v0 bash -- -c 'cat $GHC_ENVIRONMENT' | grep -v '^--' | sed -e 's/^/-/' echo "-XHaskell2010" From b2c8fd92dac2cd2ea263b77fa87f8f51dc5b0e9d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:05:06 -0400 Subject: [PATCH 04/21] =?UTF-8?q?Don=E2=80=99t=20pass=20--interactive.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/ghci-flags | 2 -- 1 file changed, 2 deletions(-) diff --git a/script/ghci-flags b/script/ghci-flags index a99d20aa67..96fffc428f 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -8,8 +8,6 @@ cd $(dirname "$0")/.. root="$(pwd)" ghc_version="$(ghc --numeric-version)" -echo "--interactive" - echo "-O0" echo "-ignore-dot-ghci" From 63f9cdb0e7817a1b68f3f23e65954368bcf50f4a Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:12:03 -0400 Subject: [PATCH 05/21] Un-ignore hie.yaml. --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index adba497525..50685cf3e7 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ tmp/ *.hp *.prof *.pyc -/hie.yaml /test.* /*.html From 1e0ec647312ca94cb560fca3783b6d27e858bf83 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:12:10 -0400 Subject: [PATCH 06/21] Add a hie.yaml using the ghci flags script. --- hie.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 hie.yaml diff --git a/hie.yaml b/hie.yaml new file mode 100644 index 0000000000..473bc3fc73 --- /dev/null +++ b/hie.yaml @@ -0,0 +1,3 @@ +cradle: + bios: + program: script/ghci-flags From 547617a3b9ff9c42aa5c2a8f20a98bf56e677295 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:16:30 -0400 Subject: [PATCH 07/21] Add a script to compute the files to watch for changes to the packages. --- script/ghci-flags-dependencies | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 script/ghci-flags-dependencies diff --git a/script/ghci-flags-dependencies b/script/ghci-flags-dependencies new file mode 100755 index 0000000000..5581fbee25 --- /dev/null +++ b/script/ghci-flags-dependencies @@ -0,0 +1,17 @@ +#!/bin/bash +# Computes the paths to files causing changes to the ghci flags. You probably won’t be running this yourself, but rather ghcide will via configuration in hie.yaml. + +set -e + +cd $(dirname "$0")/.. + +echo "cabal.project" + +echo "semantic.cabal" +echo "semantic-analysis/semantic-analysis.cabal" +echo "semantic-ast/semantic-ast.cabal" +echo "semantic-core/semantic-core.cabal" +echo "semantic-java/semantic-java.cabal" +echo "semantic-json/semantic-json.cabal" +echo "semantic-python/semantic-python.cabal" +echo "semantic-tags/semantic-tags.cabal" From 25419556349cdd2438a0508624c64057769263b6 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:16:45 -0400 Subject: [PATCH 08/21] Tell hie-bios about the dependencies. --- hie.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/hie.yaml b/hie.yaml index 473bc3fc73..70b952c814 100644 --- a/hie.yaml +++ b/hie.yaml @@ -1,3 +1,4 @@ cradle: bios: program: script/ghci-flags + dependency-program: script/ghci-flags-dependencies From 3f69e09314f8728580ef0c000693b65e47c08c74 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:35:07 -0400 Subject: [PATCH 09/21] Enable strict data, in case it ever matters. --- script/ghci-flags | 1 + 1 file changed, 1 insertion(+) diff --git a/script/ghci-flags b/script/ghci-flags index 96fffc428f..669f49593f 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -33,6 +33,7 @@ echo "-optP$root/dist-newstyle/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0. cabal exec -v0 bash -- -c 'cat $GHC_ENVIRONMENT' | grep -v '^--' | sed -e 's/^/-/' echo "-XHaskell2010" +echo "-XStrictData" echo "-Weverything" echo "-Wno-all-missed-specialisations" From 90bf61dede7abc516a8b164681942e4a2429c49f Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:35:35 -0400 Subject: [PATCH 10/21] Warnings are warnings. --- script/ghci-flags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/ghci-flags b/script/ghci-flags index 669f49593f..70cebf3705 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -35,6 +35,8 @@ cabal exec -v0 bash -- -c 'cat $GHC_ENVIRONMENT' | grep -v '^--' | sed -e 's/^/- echo "-XHaskell2010" echo "-XStrictData" +echo "-Wwarn" + echo "-Weverything" echo "-Wno-all-missed-specialisations" echo "-Wno-implicit-prelude" From c9cbc83ae3da82d0d1a56a14733458c71e0484c7 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:38:41 -0400 Subject: [PATCH 11/21] =?UTF-8?q?Don=E2=80=99t=20forget=20app.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/ghci-flags | 1 + 1 file changed, 1 insertion(+) diff --git a/script/ghci-flags b/script/ghci-flags index 70cebf3705..b25fba4d1b 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -22,6 +22,7 @@ echo "-i$root/semantic-java/src" echo "-i$root/semantic-json/src" echo "-i$root/semantic-python/src" echo "-i$root/semantic-tags/src" +echo "-i$root/app" echo "-i$root/src" echo "-i$root/bench" echo "-i$root/test" From e6fc10b293d845021a336a8ca71090609ef26561 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:50:45 -0400 Subject: [PATCH 12/21] Work relative to a builddir. --- script/ghci-flags | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/script/ghci-flags b/script/ghci-flags index b25fba4d1b..edaa09e4b5 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -8,12 +8,19 @@ cd $(dirname "$0")/.. root="$(pwd)" ghc_version="$(ghc --numeric-version)" +if [ "$1" == "--builddir" ]; then + repl_builddir="$2" + shift 2 +else + repl_builddir=dist-newstyle +fi + echo "-O0" echo "-ignore-dot-ghci" -echo "-i$root/dist-newstyle/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen" +echo "-i$root/$repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen" -echo "-I$root/dist-newstyle/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen" +echo "-I$root/$repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen" echo "-i$root/semantic-analysis/src" echo "-i$root/semantic-ast/src" @@ -28,10 +35,10 @@ echo "-i$root/bench" echo "-i$root/test" echo "-optP-include" -echo "-optP$root/dist-newstyle/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen/cabal_macros.h" +echo "-optP$root/$repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen/cabal_macros.h" # Emit package flags from the environment file, removing comments & prefixing with - -cabal exec -v0 bash -- -c 'cat $GHC_ENVIRONMENT' | grep -v '^--' | sed -e 's/^/-/' +cabal exec --builddir=$repl_builddir -v0 bash -- -c 'cat $GHC_ENVIRONMENT' | grep -v '^--' | sed -e 's/^/-/' echo "-XHaskell2010" echo "-XStrictData" From fbe02dab6438ca3d2781b2688c6ffff58000c4ff Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:50:51 -0400 Subject: [PATCH 13/21] Echo any remaining args. --- script/ghci-flags | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/ghci-flags b/script/ghci-flags index edaa09e4b5..dcd8dae318 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -56,3 +56,7 @@ echo "-Wno-name-shadowing" echo "-Wno-safe" echo "-Wno-unsafe" echo "-Wno-star-is-type" + +for arg in "$@"; do + echo "$arg" +done From 978beb7a11c93917d009873f94759c1749123638 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:52:32 -0400 Subject: [PATCH 14/21] Revert "Echo any remaining args." This reverts commit fbe02dab6438ca3d2781b2688c6ffff58000c4ff. --- script/ghci-flags | 4 ---- 1 file changed, 4 deletions(-) diff --git a/script/ghci-flags b/script/ghci-flags index dcd8dae318..edaa09e4b5 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -56,7 +56,3 @@ echo "-Wno-name-shadowing" echo "-Wno-safe" echo "-Wno-unsafe" echo "-Wno-star-is-type" - -for arg in "$@"; do - echo "$arg" -done From 09568bdbd5cb7415a5c37f24d4735fba5deeb0df Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:59:04 -0400 Subject: [PATCH 15/21] Use script/ghci-flags from script/repl. --- .ghci.semantic | 39 --------------------------------------- script/repl | 2 +- 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/.ghci.semantic b/.ghci.semantic index e34f0a0d54..dfa2827c49 100644 --- a/.ghci.semantic +++ b/.ghci.semantic @@ -5,9 +5,6 @@ -- Basic verbosity :set -v1 --- No optimizations -:set -O0 - -- Compile to object code :set -fwrite-interface -fobject-code @@ -17,45 +14,9 @@ :set -hidir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build :set -stubdir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build --- Look for autogen’d files in dist-repl -:set -idist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build/autogen - --- Load all our sources… remember to keep this up to date when we add new packages! --- But don’t add semantic-source, it’s important that we get that from hackage. -:set -isemantic-analysis/src -:set -isemantic-ast/src -:set -isemantic-core/src -:set -isemantic-java/src -:set -isemantic-json/src -:set -isemantic-python/src -:set -isemantic-tags/src -:set -iapp -:set -isrc -:set -ibench -:set -itest - --- Default language mode & extensions -:set -XHaskell2010 -:set -XStrictData - --- Warnings for compiling .hs files -:set -Weverything -:set -Wno-all-missed-specialisations -:set -Wno-implicit-prelude -:set -Wno-missed-specialisations -:set -Wno-missing-import-lists -:set -Wno-missing-local-signatures -:set -Wno-monomorphism-restriction -:set -Wno-name-shadowing -:set -Wno-safe -:set -Wno-unsafe -:set -Wno-star-is-type -- Bonus: silence “add these modules to your .cabal file” warnings for files we :load :set -Wno-missing-home-modules --- Don’t fail on warnings when in the repl -:set -Wwarn - -- Warnings for code written in the repl :seti -Weverything :seti -Wno-all-missed-specialisations diff --git a/script/repl b/script/repl index e3b153a573..f8cc8754b2 100755 --- a/script/repl +++ b/script/repl @@ -11,5 +11,5 @@ repl_builddir=dist-repl if [[ ! -d $repl_builddir ]]; then echo "$repl_builddir does not exist, first run 'cabal repl --builddir=$repl_builddir', exit, and then re-run $0" else - cabal exec --builddir=$repl_builddir ghci -- -ghci-script=.ghci.semantic $@ + cabal exec --builddir=$repl_builddir ghci -- -ghci-script=.ghci.semantic $(script/ghci-flags --builddir "$repl_builddir") $@ fi From 88545759fc258838b90a40ffbddc6159e0018ff7 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:59:30 -0400 Subject: [PATCH 16/21] =?UTF-8?q?Don=E2=80=99t=20ignore=20.ghci=20when=20u?= =?UTF-8?q?sing=20script/repl.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/repl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/repl b/script/repl index f8cc8754b2..60ed3bc0e2 100755 --- a/script/repl +++ b/script/repl @@ -11,5 +11,5 @@ repl_builddir=dist-repl if [[ ! -d $repl_builddir ]]; then echo "$repl_builddir does not exist, first run 'cabal repl --builddir=$repl_builddir', exit, and then re-run $0" else - cabal exec --builddir=$repl_builddir ghci -- -ghci-script=.ghci.semantic $(script/ghci-flags --builddir "$repl_builddir") $@ + cabal exec --builddir=$repl_builddir ghci -- -ghci-script=.ghci.semantic $(script/ghci-flags --builddir "$repl_builddir") -no-ignore-dot-ghci $@ fi From 9a212db6230daa96eae3360646165de03ff7d2f3 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 11:59:44 -0400 Subject: [PATCH 17/21] =?UTF-8?q?Note=20why=20the=20remaining=20flags=20ar?= =?UTF-8?q?en=E2=80=99t=20in=20script/ghci-flags.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .ghci.semantic | 1 + 1 file changed, 1 insertion(+) diff --git a/.ghci.semantic b/.ghci.semantic index dfa2827c49..b0865a4dbc 100644 --- a/.ghci.semantic +++ b/.ghci.semantic @@ -1,6 +1,7 @@ -- GHCI settings for semantic, collected by running cabal repl -v and checking out the flags cabal passes to ghc. -- These live here instead of script/repl for ease of commenting. -- These live here instead of .ghci so cabal repl remains unaffected. +-- These live here instead of script/ghci-flags so ghcide remains unaffected. -- Basic verbosity :set -v1 From d41961f193993ab34247133e3dc0a71d4b5dcb63 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 12:01:14 -0400 Subject: [PATCH 18/21] Move the build products dirs into script/ghci-flags. --- .ghci.semantic | 6 ------ script/ghci-flags | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.ghci.semantic b/.ghci.semantic index b0865a4dbc..bd2c752dd7 100644 --- a/.ghci.semantic +++ b/.ghci.semantic @@ -9,12 +9,6 @@ -- Compile to object code :set -fwrite-interface -fobject-code --- Write build products to dist-repl (so that we don’t clobber 'cabal build' outputs) -:set -outputdir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build -:set -odir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build -:set -hidir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build -:set -stubdir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build - -- Bonus: silence “add these modules to your .cabal file” warnings for files we :load :set -Wno-missing-home-modules diff --git a/script/ghci-flags b/script/ghci-flags index edaa09e4b5..b2be453355 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -18,6 +18,11 @@ fi echo "-O0" echo "-ignore-dot-ghci" +echo "-outputdir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" +echo "-odir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" +echo "-hidir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" +echo "-stubdir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" + echo "-i$root/$repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen" echo "-I$root/$repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen" From 8ef9e1434e87a80c2b960b6b7e3534b29a2c30af Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 12:01:42 -0400 Subject: [PATCH 19/21] Make the output dirs relative to the builddir. --- script/ghci-flags | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/ghci-flags b/script/ghci-flags index b2be453355..d7ee47a9c5 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -18,10 +18,10 @@ fi echo "-O0" echo "-ignore-dot-ghci" -echo "-outputdir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" -echo "-odir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" -echo "-hidir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" -echo "-stubdir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" +echo "-outputdir $repl_builddir/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" +echo "-odir $repl_builddir/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" +echo "-hidir $repl_builddir/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" +echo "-stubdir $repl_builddir/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" echo "-i$root/$repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen" From 110b1b69e812a71d23de1074a378fbcec3a6f6b4 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 12:02:12 -0400 Subject: [PATCH 20/21] Make the output dirs relative to the ghc version. --- script/ghci-flags | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script/ghci-flags b/script/ghci-flags index d7ee47a9c5..164b6bce6b 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -18,10 +18,10 @@ fi echo "-O0" echo "-ignore-dot-ghci" -echo "-outputdir $repl_builddir/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" -echo "-odir $repl_builddir/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" -echo "-hidir $repl_builddir/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" -echo "-stubdir $repl_builddir/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build" +echo "-outputdir $repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build" +echo "-odir $repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build" +echo "-hidir $repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build" +echo "-stubdir $repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build" echo "-i$root/$repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen" From 7662ee75f128ca190b1b94d03f20d54e4d57a6f3 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 1 Nov 2019 13:44:57 -0400 Subject: [PATCH 21/21] Take care not to load semantic-source twice. --- script/ghci-flags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/ghci-flags b/script/ghci-flags index 164b6bce6b..6e3686fa0d 100755 --- a/script/ghci-flags +++ b/script/ghci-flags @@ -42,6 +42,8 @@ echo "-i$root/test" echo "-optP-include" echo "-optP$root/$repl_builddir/build/x86_64-osx/ghc-$ghc_version/semantic-0.8.0.0/build/autogen/cabal_macros.h" +echo "-hide-all-packages" + # Emit package flags from the environment file, removing comments & prefixing with - cabal exec --builddir=$repl_builddir -v0 bash -- -c 'cat $GHC_ENVIRONMENT' | grep -v '^--' | sed -e 's/^/-/'