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


Spider Courtship Decoded by Machine Learning
07/04/2024

Using machine learning to filter out unwanted sounds and to isolate the signals made by three species of wolf spider has not only contributed to an understanding of arachnid courtship behavior, b [ ... ]



Azure AI And Pgvector Run Generative AI Directly On Postgres
26/03/2024

It's a match made in heaven. The Azure AI extension enables the database to call into various Azure AI services like Azure OpenAI. Combined with pgvector you can go far beyond full text search. Let's  [ ... ]


More News

raspberry pi books

 

Comments




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