PureScript Updates Parser
Written by Kay Ewbank   
Tuesday, 11 June 2019

There's a new version of PureScript with a completely rewritten parser. The developers say they hope this release will open up a lot of opportunities for syntactic tooling, either using the existing parser or even using alternative parsers.

PureScript is a strongly-typed functional programming language that compiles to JavaScript, and the lets developers reuse existing JavaScript code. It is written in and inspired by Haskell, but unlike Haskell, PureScript is designed specifically for compilation to (straightforward) JavaScript, and compiled PureScript code can run in any environment where JavaScript runs.



The language comes with a number of libraries making it easier to develop web applications, web servers, and apps. The developers of PureScript say it has excellent tooling and editor support with instant rebuilds, and an active community.

The attraction of PureScript is its support for functional techniques and expressive types, including:

  • Algebraic data types and pattern matching
  • Row polymorphism and extensible records
  • Higher kinded types
  • Type classes with functional dependencies
  • Higher-rank polymorphism.

The way PureScript works is that the compiler takes the PureScript source files, parses and checks them, and converts them into either CommonJS modules or a single JavaScript bundle for the browser.

While the compiler can be used directly on source files, there are a number of tools that you can use to integrate PureScript into your JavaScript workflow, including Pulp, a build tool for PureScript.

Writing about the new release, developer Nathan Faubion said that while the old parser has served its purpose well,:

it has grown very organically over the years which means it's developed some unsightly limbs! Throughout the process I've tried to iron out a lot of dark corner cases in the language grammar, and I hope this release will set us on a firm foundation so we can start to specify what "PureScript the Language" actually is."

The updated version is available on GitHub.



More Information

PureScript On GitHub


Related Articles

Discover Haskell On FutureLearn

Programming Languages Not To Learn First

Survey Reveals JavaScript Trends 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Free Resources For Machine Learning

A browser extension and two free courses, "Machine Learning with Graphs" from Stanford and "Introduction to Deep Learning" by Sebastian Raschka are three excellent resources for mastering Machine Lear [ ... ]

Astro Pi Upgraded For New Missions

Two new, upgraded, Astro Pi's are soon to be sent to the International Space Station, ready to perform experiments coded by school students as part of the challenge set by the European Space Agency an [ ... ]

More News





or email your comment to: comments@i-programmer.info