26 lines
524 B
Markdown
26 lines
524 B
Markdown
|
|
# 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:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
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
|
||
|
|
```
|