Before we begin, the type search in Pursuit is a great way to search for the functions you need.
Reset your tooling by deleting the bower_components/
, .psci_modules/
, .pulp-cache/
, .psc-package/
and output/
folders. Then run psc-package build --only-dependencies
.
Using sed or your other favourite global replace tool to search and replace all occurences in the list below will get you a long way.
All effect rows have been removed. For instance Aff e a
has become Aff a
. With some more ninja regexes
or a small parser you should be able to remove the effect rows.
Control.Monad.Eff
withEffect
Eff e
withEffect
Control.Monad.Aff
withEffect.Aff
Data.StrMap
withForeign.Object
- The type
StrMap
is renamed toObject
.
- The type
If you use psc-package, remove packages from the depends
field in your psc-package.json
file until psc-package build
stops telling you it can't find packages. Then you well get a lot of compile time errors which you can take care of by using typed holes.
purescript-maps
and purescript-sets
are merged into the new package purescript-ordered-collections
.
StrMap
is now called Object
and moved into the new package purescript-foreign-object
.
purescript-dom
has become the purescript-web-*
packages. Using typed holes will help you find the new functions.
Most other libraries have the relevant changes in their releases page on Github.
Where have all the functions gone? Programmers refactored them everyone.
liftEff'
from Control.Monad.Aff
has been moved into a quite elegant liftEffect
instance function.
id
has been renamed to identity
.
- Kritzcreek in the Purescript channel was the main source for this. I just changed the format.
- @justinwoo for comments about typed holes.
- @dstcruz for having really sharp eyes.
Suggesting type holes would also be good, since you can readily upgrade from purescript-dom to purescript-web-dom by using
?whatgoeshere
and such over your existing uses of purescript-dom.Also worth pointing out a lot of the work can be done by replacing
Control.Monad.Effect
withEffect
andEff e
withEffect