Provides packages that let you use records to specify query parameters in servant APIs.
These packages are:
- servant-queryparam-core
- servant-queryparam-server
- servant-queryparam-client
- servant-queryparam-openapi3
Here's an example of a server:
Packages in this repo are based on the following packages:
You can build all packages using cabal-install
.
cabal build all
This repository provides a Nix
flake with development tools and Nix derivations of servant-queryparam-*
libraries.
Spoiler
- flake.nix - code in this flake is extensively commented.
- language-tools/haskell - a flake that conveniently provides
Haskell
tools. - Conventions - I recommended to use this flake just for development. For packaging an app, make another flake with a limited number of inputs to reduce the
flake.lock
size.
See these for additional info:
- codium-generic - info just about
VSCodium
with extensions. - codium-haskell - an advanced version of this flake.
- Shows how to build a static binary from your package and how to make a Docker image with it.
- Haskell - general info about
Haskell
tools. - Troubleshooting
- Prerequisites
- Nixpkgs support for incremental Haskell builds
- flakes - my Nix flakes that may be useful for you.
-
Install Nix - see how.
-
In a new terminal, start a devshell and build all packages.
nix develop cabal build all
-
(Optionally) Write
settings.json
and startVSCodium
.nix run .#writeSettings nix run .#codium .
-
(Optionally) Open a
Haskell
file and hover over a function. -
(Optionally) Wait until
Haskell Language Server
(HLS
) starts giving you type info.
- package.yaml - used by
stack
orhpack
to generate a.cabal
- .markdownlint.jsonc - for
markdownlint
from the extensiondavidanson.vscode-markdownlint
- .envrc - for direnv
- fourmolu.yaml - for fourmolu
- ci.yaml - a generated
GitHub Actions
workflow. See workflows. Generate a workflow vianix run .#writeWorkflows
.