Another year, another PureScript version.

The PureScript compiler is now up to date with the released 0.12 upstream version. In fact this has been the case for a little while, but now a version is tagged and I’m happy to suggest its good to go.

Merged compiler and ecosystem changes

It’s best to look at the PureScript 0.12 release notes to get an overview of the changes in 0.12, the most exciting probably being instance chains, with a lot of general quality of life improvements. The most immediately impactful (which is to say breaking) change, however, is that the ecosystem moved from Eff to Effect, that is giving up on using effect rows, and the compiler supports this (during codegen optimisation)

I’ve mirrored this change in the purerl backend and package set updates.

Getting going - binaries and resources

I’m pleased to say there are now binaries available for linux and osx.

The purerl package sets are now updated for 0.12, currently standing at 59 packages, essentially the applicable parts of the standard PureScript core packages, and the Erlang native bindings. These are now generated using the techniques from Justin’s spacchetti with Dhall, so more likely to be updated in the future. This as well as Christoph’s experimental psc-package fork were very useful in updating the package set wholesale.

The Pursuit instance at pursuit.purerl.fun is now updated with the above package set too.

Getting started templates

There are now two “template” repositories for getting started with purerl demonstrating possible build processes:

  • purerl/hello-world - Literally a minimal hello world showing a Makefile invoking erlc, and psc-package setup.
  • OTP sandbox - Showcasing 1 possible project setup for an OTP application, with a rebar3 integrated build and some noodling on different ways of integrating OTP behaviours (suggestions on a post-card please).

In general to start a new purerl project I’d either copy an existing psc-package.json over or (not saving many characters) run:

psc-package init --source https://github.com/purerl/package-sets.git --set erl-0.12.0-20180730

Closing thoughts

Feedback welcome, I’d be interested to hear if you’re using purerl, and if you have any comments or suggestions, feel free to hit me up on twitter, FP slack, or raise an issue on the appropriate GitHub repository.