26 lines
806 B
Markdown
26 lines
806 B
Markdown
|
|
# 29-haskell-foldmap-summary
|
||
|
|
|
||
|
|
This example shows intermediate Haskell aggregation with `foldMap` and monoids.
|
||
|
|
|
||
|
|
It includes:
|
||
|
|
|
||
|
|
- a structured deployment event type,
|
||
|
|
- a summary type built from monoidal fields,
|
||
|
|
- one `foldMap` pass that aggregates several useful metrics, and
|
||
|
|
- a test suite run by `nix flake check`.
|
||
|
|
|
||
|
|
Useful commands:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
nix develop
|
||
|
|
cabal run
|
||
|
|
cabal run -- api:production:succeeded:3:platform,security worker:staging:failed-db-lock:1:ops ui:production:cancelled:2:frontend
|
||
|
|
cabal test
|
||
|
|
|
||
|
|
nix build
|
||
|
|
./result/bin/mini-summary api:production:succeeded:3:platform,security worker:staging:failed-db-lock:1:ops ui:production:cancelled:2:frontend
|
||
|
|
|
||
|
|
nix run . -- api:production:succeeded:3:platform,security worker:staging:failed-db-lock:1:ops ui:production:cancelled:2:frontend
|
||
|
|
nix flake check
|
||
|
|
```
|