servant-purescript: Generate PureScript accessor functions for you servant API

[ bsd3, library, web ] [ Propose Tags ]

Please see

[Skip to Readme]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,,,,,,,,,,,,,,,,,,,,,,,
Dependencies aeson (>=0.11.2), base (>=4.7 && <6.0), bytestring, containers, directory, filepath, http-types, lens, mainland-pretty, purescript-bridge (>=0.6), servant (>=0.14.1), servant-foreign, servant-server, servant-subscriber, text [details]
License BSD-3-Clause
Copyright Copyright: (c) 2016 Robert Klotzner
Author Robert Klotzner
Maintainer robert Dot klotzner A T gmx Dot at
Category Web
Home page
Source repo head: git clone
Uploaded by eskimo at 2020-03-03T09:14:12Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 14796 total (26 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-03-03 [all 1 reports]

Readme for servant-purescript-

[back to package description]

Servant Purescript

Build Status

Generate typed PureScript query functions for your servant-api. Find an example, including the generated code in examples/central-counter.


  • Typed serialization/deserialization, taken care of by Haskell's aeson and PureScript's argonaut. Generic encoding/decoding of both made compatible by purescript-argonaut-generic-codecs.
  • You can put common parameters like Auth tokens and the base URL in a reader monad, so you don't have to pass them explicitly. This is configurable in the code generator with readerParams in Settings.


Apart from the above basic usage example, the documentation is still lacking. For the purescript side make sure you have purescript-servant-support and purescript-argonaut-generic-codecs installed, otherwise the generated code will not compile.


It works!

Documentation is yet to come, but there is a usage example in examples/central-counter which also uses servant-subscriber for counter live updates. Generated code is only partly tested, especially Query parameters are still completely untested.

For type translations purescript-bridge is used.