2019-11-01 17:32:24 +03:00
|
|
|
|
#!/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.
|
2019-11-01 18:01:17 +03:00
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
cd $(dirname "$0")/..
|
|
|
|
|
|
|
|
|
|
root="$(pwd)"
|
|
|
|
|
ghc_version="$(ghc --numeric-version)"
|
|
|
|
|
|
|
|
|
|
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 -
|
2019-11-01 18:02:44 +03:00
|
|
|
|
cabal exec -v0 bash -- -c 'cat $GHC_ENVIRONMENT' | grep -v '^--' | sed -e 's/^/-/'
|
2019-11-01 18:01:17 +03:00
|
|
|
|
|
|
|
|
|
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"
|