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

[ bsd3, library, web ] [ Propose Tags ]

Please see README.md


[Skip to Readme]

Modules

[Last Documentation]

  • Servant
    • Servant.PureScript
      • Servant.PureScript.CodeGen
      • Servant.PureScript.Internal

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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, 0.8.0.0, 0.8.0.1, 0.9.0.0, 0.9.0.1, 0.9.0.2, 0.9.0.3, 0.9.0.4, 0.10.0.0
Dependencies aeson (>=0.11.2), base (>=4.7 && <5), containers, directory, filepath, http-types, lens, mainland-pretty, purescript-bridge (>=0.6 && <0.7), servant, servant-foreign, 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 https://github.com/eskimor/servant-purescript#readme
Source repo head: git clone https://github.com/eskimor/servant-purescript
Uploaded by eskimo at 2016-06-11T07:45:02Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 14724 total (55 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-11-23 [all 3 reports]

Readme for servant-purescript-0.1.0.2

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

Features

  • Typed serialization/deserialization taken care of by Haskell's aeson and PureScript's argonaut. Generic encoding/decoding of both made compatible by not yet merged pull request.
  • 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.

Status

It works!

Documentation is yet to come, but there is a usage example in examples/central-counter which also employs a very early version of servant-subscriber used for counter live updates. The PureScript side of servant-subscriber is very low-level and will change significantly in the future.

For type translations purescript-bridge is used.

I now have to take care of my actual project, which makes use of servant-purescript, improvements and documentation will follow on the way!