Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


PureScript in the browser

Subscribe to updates I use trypurescript

Statistics on trypurescript

Number of watchers on Github 47
Number of open issues 13
Average time to close an issue 4 months
Main language PureScript
Average time to merge a PR about 20 hours
Open pull requests 9+
Closed pull requests 6+
Last commit over 2 years ago
Repo Created over 6 years ago
Repo Last Updated over 2 years ago
Size 6.21 MB
Homepage http://try.puresc...
Organization / Authorpurescript
Latest Releasev0.11.7
Page Updated
Do you use trypurescript? Leave a review!
View open issues (13)
View trypurescript activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating trypurescript for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

PureScript API

Build Status

Very basic web service which wraps the PureScript compiler.

Client code


Compile PureScript code

POST /compile

  • Request body: PureScript code
  • Response body: Either { js: "..." } or { error: "..." }
  • Status code: 200 (success)

The response does not use error codes, to make it easier to use the API from another domain using CORS.

The output code will contain references to preloaded modules using require calls. To run these files in the browser, it is necessary to either use a require shim (such as require1k), or replace these calls and deploy a bundle of precompiled modules (the Try PureScript client uses the second approach).


The application takes the following arguments on the command line:

  • port number
  • a list of input source files


dist/build/trypurescript/trypurescript 8081 'bower_components/purescript-*/src/**/*.purs'


1. Client setup

git clone git@github.com:purescript/trypurescript.git
cd trypurescript
git co gh-pages

bower install
npm run build
npm run bundle

httpserver 8080 #eg with: alias httpserver='python -m SimpleHTTPServer'
open http://localhost:8080

2. Work with local compile server

git clone git@github.com:purescript/trypurescript.git
cd trypurescript

stack build

# use one of the backends
cd staging/core
# get the sources of the deps
psc-package update

# note: globs like **/src/** do not work
stack exec trypurescript 8081 ".psc-package/psc-0.11.6/*/*/src/**/*.purs" "src/*.purs"
# should output that is is compiling the sources (first time)
# then: Setting phasers to stun... (port 8081) (ctrl-c to quit)

3. Point client to local compile server

(instead of the ones at try.purescript.org)

# edit API.purs

  , compile: compile "http://localhost:8081"
  , getBundle: getDefaultBundle "http://localhost:8081"

trypurescript open issues Ask a question     (View All Issues)
  • over 3 years Allow testing purescript-drawing code
  • almost 4 years Scrolling past the end
  • about 4 years Further interaction with Gists
  • about 4 years Structured error format
  • over 4 years Add foreign module editor
trypurescript open pull requests (View All Pulls)
  • 0.9 client changes
  • Updates for 0.9 (core libraries)
  • Adding options to generate JS and view modes
  • 0.10 changes to client
  • 0.10 Updates
  • Type search
  • Match stack resolver from pursuit and purescript-0.11.7
  • feat(client): add social metas
  • Added tryHalogen backend
trypurescript list of languages used
trypurescript latest release notes
v0.11.7 v0.11.7

Update to 0.11.7 (@Thimoteus)

v0.11.6.1 v0.11.6.1

Return warnings from API

v0.11.6 v0.11.6

Updates for the v0.11.6 compiler

Other projects in PureScript