26 lines
805 B
Markdown
26 lines
805 B
Markdown
# 28-haskell-applicative-validation
|
|
|
|
This example shows intermediate Haskell validation with an Applicative error accumulator.
|
|
|
|
It includes:
|
|
|
|
- a custom `Validation` type that accumulates multiple errors,
|
|
- a release manifest built from validated fields,
|
|
- a CLI that reports all invalid fields at once, and
|
|
- a test suite run by `nix flake check`.
|
|
|
|
Useful commands:
|
|
|
|
```bash
|
|
nix develop
|
|
cabal run
|
|
cabal run -- service=api-gateway env=production owners=platform,security replicas=3 strategy=canary:20 window=22-24
|
|
cabal test
|
|
|
|
nix build
|
|
./result/bin/mini-validation service=api-gateway env=production owners=platform,security replicas=3 strategy=canary:20 window=22-24
|
|
|
|
nix run . -- service=api-gateway env=production owners=platform,security replicas=3 strategy=canary:20 window=22-24
|
|
nix flake check
|
|
```
|