nix-playgraound/08-haskell-adt

08-haskell-adt

This example shows intermediate Haskell data modeling with algebraic data types.

It includes:

  • sum types for targets, modes, and output style,
  • a record type for the full build plan,
  • pattern matching in both parsing and description logic, and
  • a test suite run by nix flake check.

Useful commands:

nix develop
cabal run
cabal run -- executable release quiet
cabal test

nix build
./result/bin/mini-plan executable release quiet

nix run . -- executable release quiet
nix flake check