Working with 0.11.7 in a 0.12 world


#1

With the release of 0.12 we have a situation where many commonly used libraries (e.g. Halogen) and tools (e.g. Pulp) are incompatible with the latest version of the compiler. Additionally, most documentation and learning resources reference the previous version. Until documentation, tooling, and libraries catch up it may be desirable to continue using 0.11.7, especially for newcomers to the language.

The Getting Started Guide https://github.com/purescript/documentation/blob/master/guides/Getting-Started.md has instructions for…getting started. Unfortunately those no longer work out of the box. Running npm install purescript provides v0.11.7 of the compiler and pulp init creates a project relying on bower for dependency management. The problem is that bower cannot restrict libs to just those which work with 0.11.7 bower install --save <package name> will install the latest version of a package (not necessarily 0.11.7) and this is precisely what pulp init does.

An interim solution (and long term if you don’t want to use Bower) is to use pulp --psc-package init and pulp --psc-package build, etc. as outlined at https://github.com/purescript-contrib/pulp#dependency-management.

This will require downloading psc-package from https://github.com/purescript/psc-package/releases and using psc-package install.

Note that node-purescript could be updated at any time, so the safest thing to do is Other options are to grab a binary from https://github.com/purescript/purescript/releases/tag/v0.11.7 or compile it from source.

Edit: npm install purescript now installs the new compiler version (0.12).
Edit: Clarify how pulp init uses bower install.


PureScript Compiler Release v0.12.0
#2

I wrote a post in March about how to get started with in PureScript with psc-package as your package manager: https://qiita.com/kimagure/items/570e6f2bbce5b4724564


#3

And there’s @justinw’s https://github.com/justinwoo/purescript-0.12.0-hello-world if you want to get started with 0.12 now.


#4

but that is 0.12, isn’t this thread about 0.11.7?


#5

Amended the comment to clarify


#6

I forgot to post here that I wrote about this https://purescript-resources.readthedocs.io/en/latest/0.11.7-to-0.12.0.html