The servant-purescript package

[Tags:bsd3, library, test]

Please see

[Skip to Readme]


Dependencies aeson (>=0.11.2), base (>=4.7 && <6.0), bytestring, containers, directory, filepath, http-types, lens, mainland-pretty, purescript-bridge (>=0.6), servant, servant-foreign, servant-server, servant-subscriber, text [details]
License BSD3
Copyright Copyright: (c) 2016 Robert Klotzner
Author Robert Klotzner
Maintainer robert Dot klotzner A T gmx Dot at
Category Web
Home page
Source repository head: git clone
Uploaded Wed May 3 07:10:01 UTC 2017 by eskimo
Distributions LTSHaskell:, NixOS:, Stackage:, Tumbleweed:
Downloads 829 total (48 in the last 30 days)
0 []
Status Docs not available [build log]
All reported builds failed as of 2017-05-03 [all 3 reports]
Hackage Matrix CI


  • Servant
    • API
      • Servant.API.BrowserHeader
    • Servant.PureScript
      • Servant.PureScript.CodeGen
      • Servant.PureScript.Internal
      • Servant.PureScript.MakeRequests
      • Servant.PureScript.Subscriber


Maintainer's Corner

For package maintainers and hackage trustees

Readme for servant-purescript

Readme for servant-purescript-

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.