add readme

This commit is contained in:
Alexander Thiemann 2015-08-09 18:43:46 +02:00
parent dc3438c1a9
commit a6956da995
2 changed files with 56 additions and 1 deletions

55
README.md Normal file
View File

@ -0,0 +1,55 @@
Elm Bridge
=====
[![Build Status](https://travis-ci.org/agrafix/elm-bridge.svg)](https://travis-ci.org/agrafix/elm-bridge)
[![Hackage Deps](https://img.shields.io/hackage-deps/v/elm-bridge.svg)](http://packdeps.haskellers.com/reverse/elm-bridge)
## Intro
Hackage: [elm-bridge](http://hackage.haskell.org/package/elm-bridge)
**WARNING: Work in progress!**
Building the bridge from [Haskell](http://haskell.org) to [Elm](http://elm-lang.org) and back. Define types once, use on both sides and enjoy easy (de)serialisation. Cheers!
## Usage
```haskell
{-# LANGUAGE TemplateHaskell #-}
import Elm.Derive
import Elm.TyRender
import Elm.TyRep
import Data.Proxy
data Foo
= Foo
{ f_name :: String
, f_blablub :: Int
} deriving (Show, Eq)
main :: IO ()
main =
putStrLn $ renderElm $ compileElmDef (Proxy :: Proxy Foo)
```
Output will be:
```elm
type alias Foo =
{ f_name: String
, f_blablub: Int
}
```
For more usage examples check the tests.
## Install
* Using cabal: `cabal install elm-bridge`
* From Source: `git clone https://github.com/agrafix/elm-bridge.git && cd elm-bridge && cabal install`
## Todo
* Generate Elm JSON Serializer/Parser

View File

@ -2,7 +2,7 @@ name: elm-bridge
version: 0.1.0.0
synopsis: Derive Elm types from Haskell types
description: Building the bridge from Haskell to Elm and back. Define types once,
use on both sides and enjoy free (de)serialisation. Cheers!
use on both sides and enjoy easy (de)serialisation. Cheers!
homepage: http://github.com/agrafix/derive-elm
license: BSD3
license-file: LICENSE