haskell-servant / haskell-servant/servant

How to implement a dependently-typed server with servant-server >0.4

Open
#1,095 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
2k
Forks
427
Avg merge
2d 23h
Merged PRs (30d)
5

Description

I am trying to adapt the ideas in https://www.well-typed.com/blog/2015/12/dependently-typed-servers/ to more recent versions of `servant-server`.

In `servant-server-0.4` in the `route` method you could access the request, parse the path segment, do dependent pattern-matching on the decoded value and then call `route` recursively. In recent versions you cannot access the request directly anymore, but have to work with a `Delayed`, therefore the same technique is not applicable.

For an example of where I am stuck, you can look at this experimental branch of my `versioning` library: https://github.com/lortabac/versioning/blob/servant-dependent-i-am-stuck/versioning-servant/src/Versioning/Servant/Dependent.hs

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.