@@ -18,21 +18,31 @@ pkgs=( wai
1818 warp-static
1919 )
2020
21+# install each sub-respository
2122for pkg in "${pkgs[@]}"; do
2223 echo "Installing $pkg..."
2324
2425 (
2526 cd "./$pkg"
2627
27− if ! $CABAL configure --enable-tests --ghc-options="-Wall -Werror" ; then
28+ if [ $1 == "--clean" ]; then
29+ $CABAL clean
30+ fi
31+
32+ if ! $CABAL configure --ghc-options="-Wall -Werror"; then
2833 $CABAL install --only-dependencies
29− $CABAL configure --enable-tests --ghc-options="-Wall -Werror"
34+ $CABAL configure --ghc-options="-Wall -Werror"
3035 fi
36+ $CABAL build
3137
38+ $CABAL configure --enable-tests
3239 $CABAL build
3340 $CABAL test
41+
3442 $CABAL check
35− $CABAL haddock --executables
43+ if [ $1 != "--fast" ]; then
44+ $CABAL haddock --executables
45+ fi
3646 ./Setup.lhs install
3747 )
3848done