Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.