I’m excited and proud to announce the release of PureScript 0.15!
npm i -g purescript
If you are new to PureScript, you can follow the getting started guide to give it a try.
0.15.0's main feature is the support for ES modules. But that’s really a summary for the following changes:
modernizes the FFI to use ES modules and dropping support for CommonJS modules
purs bundleand defers to external tools like
esbuild, which produces a bundle size ~25% smaller than
enables unbundled development and integration with new tooling like Snowpack
This release also fixes the two major reasons why
npm install purescript would sometimes fail:
glibc. Say hello to a better newcomer experience.
Type-level programming fans will also enjoy the support for type-level integers. Be creative and let us know how to further build upon this feature.
As for the rest of the new features and other improvements, you can read about them in the compiler release notes:
Due to the FFI migration and other breaking changes, most code that compiles with PureScript 0.14 does not compile on PureScript 0.15. Fortunately, the 0.15 migration guide refers to a script that can automatically migrate most CommonJS code to ES Modules. It also lists what changes one needs to make to get the code to compile again:
PureScript’s core infrastructure is compatible with PureScript 0.15. But a few resources won’t transition for a little while longer. These include:
The PureScript book, which is still written for the 0.14.x compiler series.
Try PureScript, which will take some work before it supports PureScript 0.15.
If you would like to help out with updating these resources, please let us know.
The core libraries have all moved to new major versions to support the new compiler. This means that most libraries in the ecosystem will also need to update to new major versions.
If you are a Spago user, then you will automatically opt-in to the latest 0.15-compatible package set if you run
spago init or
spago upgrade-set and have the
0.15.0 compiler in your PATH. If you are a Bower user, then you can update your dependencies to their new major versions the usual way. (Use this jq script to update
The initial PureScript 0.15 package set contains all libraries from the
purescript-web organizations. It also includes any libraries from the latest
0.14.7 package set that still compile. This is a small package set, but it will grow rapidly in the coming weeks.
Many libraries have been dropped from the package set because they did not compile with the new compiler and core libraries. The vast majority of libraries that were dropped only need simple, largely mechanical updates to be compatible again.
If your library is one of them, please refer to the migration guide and the changelogs of your dependencies for help updating. Once your library is updated, you will need to make a pull request to the package sets repository.
We have commented out libraries from the 0.14.7 package set that were dropped from the 0.15.0 package set. This should help you make updates – simply uncomment your library, update the version number and/or dependencies, and submit a pull request.
If your library wasn’t dropped, you may still want to update it to take advantage of some of the new features.
Finally, consider cleaning up some of the warnings the compiler emits via
npm i -g purescript-psa # if using spago spago build --purs-args "--censor-lib --strict" # if using pulp pulp build -- --censor-lib --strict
Special thanks goes to all those who helped out with the ES modules compiler support, library migration, and documentation updates:
And shout-out to @PureFunctor, a newer contributor to the PureScript compiler, who’s been doing some great work!
Lastly, thank you @sid-yip for fixing the
glibc issue. That has been a hindrance for quite some time.
You can begin using PureScript 0.15 today. Please enjoy the new release!