Skip to content

Commit

Permalink
Merge pull request #24 from haskell-works/upgrade-hw-rankselect-to-0.13
Browse files Browse the repository at this point in the history
Upgrade hw-rankselect to 0.13
  • Loading branch information
newhoggy authored Apr 3, 2019
2 parents ca5fef9 + 8d5e6e6 commit 8e1bfc3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 30 deletions.
2 changes: 1 addition & 1 deletion hw-simd.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ common hw-bits { build-depends: hw-bits >= 0.7.0.2
common hw-hedgehog { build-depends: hw-hedgehog >= 0.1.0.1 && < 0.2 }
common hw-hspec-hedgehog { build-depends: hw-hspec-hedgehog >= 0.1.0.4 && < 0.2 }
common hw-prim { build-depends: hw-prim >= 0.6.2.12 && < 0.7 }
common hw-rankselect { build-depends: hw-rankselect >= 0.12.0.2 && < 0.13 }
common hw-rankselect { build-depends: hw-rankselect >= 0.13 && < 0.14 }
common hw-rankselect-base { build-depends: hw-rankselect-base >= 0.3.2.0 && < 0.4 }
common lens { build-depends: lens }
common mmap { build-depends: mmap >= 0.5.9 && < 0.6 }
Expand Down
63 changes: 45 additions & 18 deletions project.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,59 @@
#!/usr/bin/env bash

STACK_FLAGS="
--flag bits-extra:bmi2
--flag hw-rankselect-base:bmi2
--flag hw-rankselect:bmi2
--flag hw-simd:bmi2
--flag hw-simd:avx2
"

case $1 in
CABAL_FLAGS=""

cmd="$1"

shift

case "$cmd" in
install)
cabal new-install \
--symlink-bindir=$HOME/.local/bin \
-j8 --overwrite-policy=always --disable-documentation \
exe:hw-json
$CABAL_FLAGS "$@"
;;

build)
stack build \
--test --no-run-tests --bench --no-run-benchmarks \
$STACK_FLAGS
cabal new-build all -j8 \
--disable-tests --disable-benchmarks \
$CABAL_FLAGS "$@"
;;

exec)
cabal new-exec "$(echo *.cabal | cut -d . -f 1)" "$@"
;;

test)
stack test \
$STACK_FLAGS
cabal new-test -j8 --enable-tests --disable-documentation \
$CABAL_FLAGS "$@"
;;

bench)
stack bench \
$STACK_FLAGS
cabal new-bench -j8 \
$CABAL_FLAGS "$@"
;;

repl)
stack repl \
$STACK_FLAGS
cabal new-repl \
$CABAL_FLAGS "$@"
;;

clean)
cabal new-clean
;;

*)
echo "Unrecognised command: $cmd"
exit 1
;;
esac

# haskell-ide-engine work-around
for x in $(find dist-newstyle -name setup-config | grep '/opt/setup-config$' | sed 's|/opt/setup-config$||g'); do
( cd $x
ln -fs opt/setup-config setup-config
)
done

11 changes: 0 additions & 11 deletions stack.yaml

This file was deleted.

0 comments on commit 8e1bfc3

Please sign in to comment.