Skip to content

Instantly share code, notes, and snippets.

@justinwoo
Last active January 6, 2019 16:34
Show Gist options
  • Save justinwoo/c28327abe623c117e938a0b471b2e2a2 to your computer and use it in GitHub Desktop.
Save justinwoo/c28327abe623c117e938a0b471b2e2a2 to your computer and use it in GitHub Desktop.
See the PureScript Resources guide page at https://purescript-resources.readthedocs.io/en/latest/0.11.7-to-0.12.0.html. PureScript 0.11.7 -> PureScript 0.12.0 checklist

There are some changes you will need to make for most applications to be upgraded to PureScript 0.12. With some usage of editor commands, you should be able to convert any 20K LOC codebase in less than an hour.

Libraries

  • Remove eff, install effect
  • Remove dom and dom-*, use web-dom and such from purescript-web. Use type holes (?whatmethod) to discover new APIs
  • Remove maps, install ordered-collections for Map/Set/etc. and foreign-object for StrMap

Changes

  • Eff (fx :: # Type) a -> Effect a
  • Control.Monad.Effect -> Effect
  • id -> identity
  • Data.Record -> Record

Updating libraries

General

  • Use psc-package build -d or pulp build --src-path some-empty-folder if you want to only build dependencies first (you should)

FAQ

Which UI library do I use?

Halogen

What if I want to use React?

React-Basic

What if I want to use any library?

See docs for how to use FFI https://pursuit.purescript.org/packages/purescript-eff/3.2.1/docs/Control.Monad.Eff.Uncurried

Then read the docs for Aff https://pursuit.purescript.org/packages/purescript-aff/5.0.1

Optionally, read the docs for Aff-Promise https://pursuit.purescript.org/packages/purescript-aff-promise/2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment