Skip to content

deemp/servant-queryparam

Repository files navigation

servant-queryparam

Provides packages that let you use records to specify query parameters in servant APIs.

These packages are:

Here's an example of a server:

Background

Packages in this repo are based on the following packages:

Build

You can build all packages using cabal-install.

cabal build all

Nix flake

This repository provides a Nix flake with development tools and Nix derivations of servant-queryparam-* libraries.

Prerequisites

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:

Quick start

  1. Install Nix - see how.

  2. In a new terminal, start a devshell and build all packages.

    nix develop
    cabal build all
  3. (Optionally) Write settings.json and start VSCodium.

    nix run .#writeSettings
    nix run .#codium .
  4. (Optionally) Open a Haskell file and hover over a function.

  5. (Optionally) Wait until Haskell Language Server (HLS) starts giving you type info.

Configs

About

Use records to specify query parameters in servant APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published