12-haskell-parser-combinators
This example shows intermediate Haskell parsing with Megaparsec and parser combinators.
It includes:
- a small command language for deploy instructions,
- parser combinators for sequencing, choice, repetition, and end-of-input,
- a CLI that parses and renders the parsed command, and
- a test suite run by
nix flake check.
Useful commands:
nix develop
cabal run
cabal run -- deploy api production tags=blue,stable
cabal test
nix build
./result/bin/mini-parser deploy api production tags=blue,stable
nix run . -- deploy api production tags=blue,stable
nix flake check