Skip to content

Commit c35c572

Browse files
authored
Merge pull request #128 from liontiger23/ghc-pkg-id
macros: prepare haskell macros for GHC 9.8 update
2 parents 1c50377 + 46b9ac7 commit c35c572

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

data/macros/actions/haskell.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ actions:
77
echo "import Distribution.Simple" > Setup.hs
88
echo "main = defaultMain" >> Setup.hs
99
fi
10-
export GHCV=$(ghc --numeric-version)
1110
runhaskell Setup configure --prefix=%PREFIX% \
1211
--libdir=%libdir% \
1312
--libsubdir="\$compiler/lib/\$abi/\$pkg-\$version" \
@@ -44,11 +43,11 @@ actions:
4443
- cabal_configure: |
4544
function cabal_configure() {
4645
export CABAL_DIR="$HOME/.cabal"
47-
export GHCV=$(ghc --numeric-version)
46+
export GHCV=$(ghc-pkg field ghc id | cut -d ' ' -f 2)
4847
cabal update
4948
cabal build %JOBS% --only-dependencies --disable-tests -O2 --ghc-options="-H128m %JOBS%" "$@"
5049
%haskell_configure --disable-executable-dynamic \
51-
--package-db=$HOME/.cabal/store/ghc-$GHCV/package.db \
50+
--package-db=$HOME/.cabal/store/$GHCV/package.db \
5251
"$@"
5352
}
5453
cabal_configure

0 commit comments

Comments
 (0)