The servant-purescript package

[Tags:bsd3, library, test]

Please see README.md


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.2.0.0, 0.2.0.1, 0.3.0.0, 0.3.1.0, 0.3.1.1, 0.3.1.2, 0.3.1.3, 0.3.1.4, 0.3.1.5, 0.4.0.0, 0.4.0.1, 0.5.0.0, 0.6.0.0, 0.7.0.0
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 https://github.com/eskimor/servant-purescript#readme
Source repository head: git clone https://github.com/eskimor/servant-purescript
Uploaded Mon Feb 20 09:38:17 UTC 2017 by eskimo
Distributions LTSHaskell:0.6.0.0, NixOS:0.7.0.0, Stackage:0.7.0.0, Tumbleweed:0.6.0.0
Downloads 539 total (11 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Last success reported on 2017-02-20 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for servant-purescript

Readme for servant-purescript-0.7.0.0

Servant Purescript

Build Status

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

Features

  • 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.

Usage

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.

Status

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.