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.

purescript

 

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.

purescript

 

More Information

PureScript On GitHub

PureScript.Org

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.

Banner


Run WebAssembly Components Inside Node.js With Jco
28/03/2024

Jco 1.0 has been just announced by the Bytecode Alliance.It's a native JavaScript WebAssembly toolchain and runtime that runs Wasm components inside Node.js. Why is that useful?



GitHub Introduces Code Scanning
26/03/2024

GitHub has announced a public beta of a code scanner that automatically fixes problems. The new feature was announced back in November, but has now moved to public beta status.  


More News

raspberry pi books

 

Comments




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