Back to Purescript

0.10 Migration Guide

migration-guides/0.10-Migration-Guide.md

latest1.4 KB
Original Source

The 0.10 release contains many changes, some of which result in compile errors on PureScript code which previously successfully compiled.

Because the v0.10.1 release notes lists all changes, this page is intended to document how to migrate a project into this new release.

Functional Dependencies

The type class solver now supports functional dependencies. This affects your project if it uses type classes which use this new feature. Many commonly-used type classes have been updated to use this new feature, which means you should follow the "Library Updated" migration pattern. If your code makes an instance a type class which has been updated to use a functional dependency, your instance may fail type-checking.

Migration Patterns

  1. Library Updated If your project contains code which uses a new feature, your project will not compile unless using a new version of the PureScript compiler. Keep in mind that your project's code consists of your own code as well as all libraries it depends on, which means you must use the highest version of the compiler required by you or your libraries. For example, if a library version you're using requires, for example, compiler v2 while your project was planning to use v1, you must now use v2 to compile your project. Alternatively, identify the libraries you use which use v2 compiler features and find earlier versions of them which don't use v2 features.