my answers in Haskell
This project builds with The Haskell Cabal.
Setup:
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
ghcup install cabal latest
ghcup install ghc 9.10.1
cabal configure --with-compiler ghc-9.10 --enable-tests
Run the Hspec test suite:
cabal test test:aoc2024-test
Run criterion benchmarks (results online):
cabal bench bench:aoc2024-bench
Print solutions for the inputs provided in local data files:
cabal run exe:aoc2024
Generate Haddock API documentation:
cabal haddock lib:aoc2024
Run hlint source code suggestions:
cabal install hlint
hlint src test bench
Run ormolu formatting:
cabal install ormolu
git ls-files -coz '*.hs' | xargs -0 ormolu --mode inplace
Run cabal-gild formatting:
cabal install cabal-gild
cabal-gild -i aoc2024.cabal -o aoc2024.cabal