@hackage purescript-bridge0.8.0.0
Generate PureScript data types from Haskell data types
Categories
License
BSD-3-Clause
Maintainer
robert . klotzner A T gmx . at
Links
Versions
Installation
Dependencies (9)
- base >=4.8 && <6.0
- containers
- directory
- filepath
- generic-deriving
- lens Show all…
Dependents (2)
@hackage/servant-subscriber, @hackage/servant-purescript
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".
Data type translation is fully and easily customizable by providing your own BridgePart instances!
JSON encoding / decoding
For compatible JSON representations you should be using aeson's generic encoding/decoding with default options
and encodeJson and decodeJson from "Data.Argonaut.Generic.Aeson" in purescript-argonaut-generic-codecs.
Documentation
Usage of this library is documented in Language.Purescript.Bridge.
All you should need to get started is: writePSTypes.
Status
It works for my use case and is used in production. PRs for more PSTypes definitions and bridges are very welcome!