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


We Built A Software Engineer
20/03/2024

One of the most worrying things about being a programmer today is the threat from AI. It has gone so far that NVIDA CEO Jensen Huang proclaims that you really shouldn't start training as a programmer  [ ... ]



Is PHP in Trouble?
10/04/2024

The April 2024 headline for the TIOBE Index, which ranks programming languages in terms of their popularity, reads, "Is PHP losing its mojo" asking this question because this month PHP has dropped out [ ... ]


More News

raspberry pi books

 

Comments




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