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


Apollo Adds REST APIs For GraphQL
29/10/2024

Apollo has added a simpler way to integrate REST APIs into a federated GraphQL environment. Available now in public preview, can be used to map REST API endpoints to their GraphQL schema using a decla [ ... ]



JavaZone - The Conference We Missed
25/10/2024

Amongst the many Java related conferences, this one flew under the radar. A real shame because it had many great sessions.
JavaZone might not be that famous internationally, but it still is the bi [ ... ]


More News

espbook

 

Comments




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