Create PureScript datatypes from Haskell datatypes
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Language/PureScript
test
.gitignore
.travis.yml
LICENSE
README.md
Setup.hs
purescript-bridge.cabal
shell.nix
stack-7.10.yaml
stack-8.0.nix
stack-8.0.yaml
stack.nix

README.md

purescript-bridge

Build Status

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, with writePSTypes you should have everything to get started. Documentation can be found here.

Status

It works for my use case and is used in production. PRs for more PSTypes definitions and bridges are very welcome!