09-haskell-newtype
This example shows intermediate Haskell domain modeling with newtype and smart constructors.
It includes:
newtypewrappers forUserNameandEmail,- smart constructors that validate raw input,
- an explicit
Either Stringerror path, and - a test suite run by
nix flake check.
Useful commands:
nix develop
cabal run
cabal run -- learner learner@example.com
cabal test
nix build
./result/bin/mini-registration learner learner@example.com
nix run . -- learner learner@example.com
nix flake check