wkoiking / purescript-with-warp

Sample program for PureScript with Haskell warp server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample program for PureScript with Haskell warp server.

purescript-bridge package is used for automatic generation of PureScript types/encoder/decode from Haskell types.

How to build and run

  1. Execute below commands:
npm install virtual-dom
npm install browserify

spago bundle-app && browserify index.js > main.js

stack build
stack exec purescript-with-warp-exe
  1. Access: http://localhost:8080

Development with ghci

Using reload command :r in ghci and restart :: IO () function defined in app/DevelMain.hs, you can spare the build time for development. e.g.

$ stack ghci
*Main CodeGen DevelMain Lib Type> :r
*Main CodeGen DevelMain Lib Type> update

The update command will:

  1. auto generate pureScript-src/src/Type.purs file from haskell src/Type.hs.
  2. kill the previous server thread in ghci if any, and
  3. start the new server thread in ghci

About

Sample program for PureScript with Haskell warp server

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 61.3%Language:PureScript 24.5%Language:Dhall 14.1%