26 lines
503 B
Markdown
26 lines
503 B
Markdown
|
|
# 07-haskell-deps
|
||
|
|
|
||
|
|
This example shows a small Haskell project that uses external libraries from the package set.
|
||
|
|
|
||
|
|
It includes:
|
||
|
|
|
||
|
|
- a library that parses JSON with `aeson`,
|
||
|
|
- `text` and `bytestring` usage in the library and CLI,
|
||
|
|
- an executable under `app/`, and
|
||
|
|
- a test suite run by `nix flake check`.
|
||
|
|
|
||
|
|
Useful commands:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
nix develop
|
||
|
|
cabal run
|
||
|
|
cabal run -- '{"name":"flakes"}'
|
||
|
|
cabal test
|
||
|
|
|
||
|
|
nix build
|
||
|
|
./result/bin/mini-json '{"name":"flakes"}'
|
||
|
|
|
||
|
|
nix run . -- '{"name":"flakes"}'
|
||
|
|
nix flake check
|
||
|
|
```
|