Last active
August 28, 2025 14:07
-
-
Save marinelli/e56b3ad0eef8b7af8de93907e4689953 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
_PKGS=("$@") | |
if [ ${#_PKGS[@]} -eq 0 ]; then | |
_PKGS=('all' 'all:tests' 'all:benchmarks') | |
fi | |
_LOGS=$(mktemp) | |
export _LOGS | |
_GHC_OPTIONS='-Wunused-packages -Wno-error=unused-packages' | |
cabal build --ghc-options "$_GHC_OPTIONS" --jobs=1 "${_PKGS[@]}" 2>&1 | tee "$_LOGS" | |
printf '\n---\n' | |
grep -w exposed "$_LOGS" | sort | uniq -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment