purescript-bridge: Generate PureScript data types from Haskell data types

[ bsd3, library, web ] [ Propose Tags ]
Versions [RSS] 0.1.0.0, 0.3.0.0, 0.3.0.2, 0.3.0.3, 0.3.0.4, 0.3.0.5, 0.3.0.6, 0.3.1.0, 0.3.1.1, 0.3.2.0, 0.4.0.0, 0.6.0.0, 0.6.0.1, 0.6.0.2, 0.7.0.0, 0.7.0.1, 0.8.0.0, 0.8.0.1, 0.9.0.0, 0.10.0.0, 0.10.1.0, 0.11.0.0, 0.11.1.0, 0.11.1.1, 0.11.1.2, 0.12.0.0, 0.13.0.0, 0.14.0.0, 0.15.0.0
Dependencies base (>=4.8 && <4.9), containers, directory, filepath, generic-deriving, text [details]
License AGPL-3.0-only
Author Robert Klotzner
Maintainer robert.klotzner@gmx.at
Category Web
Source repo head: git clone https://github.com/eskimor/purescript-bridge.git
Uploaded by eskimo at 2016-03-24T11:06:34Z
Distributions LTSHaskell:0.15.0.0, NixOS:0.15.0.0, Stackage:0.15.0.0
Reverse Dependencies 1 direct, 1 indirect [details]
Downloads 20816 total (84 in the last 30 days)
Rating 1.25 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-03-24 [all 1 reports]

Readme for purescript-bridge-0.3.1.1

[back to package description]

purescript-bridge

Translate your Haskell types to PureScript types. It should in theory work for almost all Haskell types, including type constructors! You just have to instantiate it with dummy parameters from e.g. "Language.PureScript.Bridge.TypeParameters".

For compatible JSON representations you should be using aeson's generic encoding/decoding with default options and gAesonEncodeJson and gAesonDecodeJson from the purescript-argonaut-codecs package, (Data.Argonaut.Aeson).

At the time of this writing the PR providing Data.Argonaut.Aeson was not yet merged. In the meantime, you can find the PR here.

Usage of this library is documented in Language.Purescript.Bridge.

All you should need to get started is: writePSTypes.

You can customize data type translation by providing your own TypeBridge.

This library is at a really early stage. It works for my use case at the moment and I will fix bugs when they come along.

Expect bugs - especially for more advanced use cases!