migration-guides/0.15-Ecosystem-Update.md
The following changes are not listed below because they appear multiple times:
purs-tidy formatterMonadZero instancesmath dependency; updated importsIf a library's changes consisted only of the above entries, it was removed from this list.
purescript LibrariesarraysBreaking changes:
group' and empty (#219 by @JordanMartinez)Other improvements:
find (#216 by @JamieBallingall)consoleNew features:
debug (#36)controlBreaking changes:
<|> right associative (#80 by @JordanMartinez)foldable-traversableBreaking changes:
foldMap1Default (#147 by @JordanMartinez)Other improvements:
mapWithIndexArray (#145)foreignOther improvements:
Replace all usages of F and FT with Except/ExceptT (NonEmptyList ForeignError) (#87 by @JordanMartinez)
Often times, the F and FT aliases did more to hinder usage of this library than help. These aliases
haven't been deprecated, but usage of them is now discouraged. All code in the library now uses
the full type that is aliased by F and FT.
freeBreaking changes:
unfoldCofree; use buildCofree instead (#124 by @JordanMartinez)graphsNew features:
Foldable and Traversable instances for Graph (#16 by @MaybeJustJames)integersBreaking changes:
trunc from math package (#51 by @JordanMartinez)Other improvements:
math package (#51 by @JordanMartinez)listsBreaking changes:
group' and mapWithIndex (#206 by @JordanMartinez)groupAllBy to use a comparison function (#191)maybeNew features:
Semiring instance (#59)newtypeNew features:
modify (#19 by @dwhitney)nonemptyOther improvements:
fold1 (#45 by @JordanMartinez)numbersNew features:
Ported various functions & constants from purescript-math (#18 by @JamieBallingall)
Specifically...
abs, signmax, min (which work differently than Number's Ord instance)ceil, floor, trunc, remainder/%, roundlogexp, pow, sqrtacos, asin, atan, atan2, cos, sin, tane, ln2, ln10, log10e, log2e, pi, sqrt1_2,
sqrt2, and tauordered-collectionsNew features:
Data.Map.Internal data constructors (#52 by @natefaubion)Semigroup/Monoid instances to Map with Warn (#54 by @JordanMartinez)Performance improvements:
foldr, foldl, foldMap, foldlWithIndex, foldrWithIndex, foldMapWithIndex, unionWith, keys and values (#60 by @xgrommx, #61 and #62 by @JordanMartinez)preludeBreaking changes:
NoConstructors to newtype Void (#282 by @JordanMartinez)Proxy (#281, #288 by @JordanMartinez)signum zero to return zero (#280 by @JordanMartinez)Show instance on records with duplicate labels by adding Nub constraint (#269 by @JordanMartinez)New features:
Data.Reflectable module for type reflection (#289 by @PureFunctor)Other improvements:
unit's FFI representation from {} to undefined (#267 by @JordanMartinez)flip (#271 by @JordanMartinez)Number is not a fully law abiding instance of Ord (#277 by @JamieBallingall)join in Data.Show has been renamed to intercalate to
match the same function in Data.Show.Generic (#274 by @cdepillabout)quickcheckBreaking changes:
Replaced polymorphic proxies with monomorphic Proxy (#132 by @JordanMartinez)
Make frequency use NonEmptyArray (#131 by @JordanMartinez)
Now oneOf and frequency both use NonEmptyArray rather than NonEmptyList.
Bugfixes:
quickCheckPure and quickCheckPure' stack safety (#127)recordBreaking changes:
Proxy (#81 by @JordanMartinez)stringsBreaking changes:
Proxy (#158 by @JordanMartinez)slice, drop bounds checking and Maybe return type (#145 by Quelklef)Other improvements:
RegexFlags a newtype and a Newtype instance for it(#159 by @mhmdanas)transformersNew features:
Foldable, FoldableWithIndex, and Traversable instances for EnvT (#113 by @abaco)typelevel-preludeBreaking changes:
Proxy (#72 by @JordanMartinez)New features:
# infix operator for FLIP (e.g. Int # Maybe == Maybe Int) (#73 by @JordanMartinez)unfoldableNew features:
iterateN function (#20 by @matthewleon and @JordanMartinez)validationBreaking changes:
unV; use validation instead (#38 by @JordanMartinez)purescript-contrib LibrariesaffBreaking changes:
launchAff_ to only work on Aff Unit (#203 by @i-am-the-slime)Other improvements:
spago.dhall file (#205 by @ptrfrncsmrph)affjaxBreaking changes:
Update all request functions to take a driver arg (#171 by @JordanMartinez)
Affjax works on the Node.js and browser environments by relying on a require
statement within a function. Depending on the environment detected,
either XHR or XmlHttpRequest is used. Since ES modules do not allow
one to call import within a function in a synchronous way,
we cannot continue to use this approach.
Rather, all request-related functions (e.g. request, get, etc.) now take
as their first argument an AffjaxDriver value. Different environments
will pass in their implementation for that driver and re-export
the functionality defined in affjax.
To fix your code, depend on the corresponding library below and update the imported
module from Affjax to Affjax.Node/Affjax.Web:
purescript-affjax-node.purescript-affjax-web.affjax-nodeNew library for making purescript-affjax work on Node
affjax-webNew library for making purescript-affjax work on the browser
argonaut-coreOther improvements:
jsonParser was imported from Data.Argonaut.Core instead of Data.Argonaut.Parser (#50 by @flip111)argonaut-traversalsOther improvements:
README.md to make the Quick start example runnable (#37 by @dk949)arraybufferBreaking Changes:
Proxy (#41 by @JordanMartinez)colorsNew features:
toHexString and fromHexString (#56 by @nsaunders)cssBreaking changes:
Add support for calc expressions (#140 by @nsaunders)
Add table selector (#141 by @plurip-software)
Update the box-shadow implementation (#88 by @vyorkin)
Dropped almost all named colors (#156 by @JordanMartinez)
These colors were originally defined in purescript-colors (i.e.
one module per schema) because each schema should be defined as its
own library. This change was propagated to this release.
New features:
text-direction (#83, #137 by @vyorkin and @JordanMartinez)visibility property (#148 by @nsaunders)Other improvements:
padding: 1 2 3 4 ) (#135 by @chexxor and @JordanMartinez)forkOther improvements:
nowOther improvements:
parsingBreaking changes:
New optimized internals. ParserT now has a more efficient representation,
resulting in (up to) 20x performance improvement. In addition to the performance,
all parser execution is always stack-safe, even monadically, obviating the need
to run parsers with Trampoline as the base Monad or to explicitly use MonadRec.
Code that was parametric over the underlying Monad no longer needs to propagate a Monad constraint.
Code that constructs parsers via the underlying representation will need to be updated, but otherwise the interface is unchanged and parsers should just enjoy the speed boost.
(#154 by @natefaubion)
Make <??> right-associative (#164 by @JordanMartinez)
Drop <?> and <~?> prec from 3 to 4 (#163, #164 by @JordanMartinez)
<|> was made right associative. Decreasing these two operators
prevents a compiler error (i.e. MixedAssociativityError)
without causing issues with <$>.
Rename module prefix from Text.Parsing.Parser to Parsing (#169 by @jamesdbrock)
Replace the regex parser. (#170 by @jamesdbrock)
Add the index field to Position. (#171 by @jamesdbrock)
Move the parsers
whiteSpaceskipSpacesoneOfoneOfCodePointsnoneOfnoneOfCodePoints
from Parsing.String to Parsing.String.Basic. (#183 by @jamesdbrock)Change MonadState instance (#187 by jamesdbrock)
Users who stack a ParserT on a StateT base monad will call the MonadState members directly like get instead of needing to do lift <<< get.
To get the ParserT internal state, call getParserT instead of get.
New features:
Add the anyTill primitive String combinator. (#186 by @jamesdbrock)
Add the Parsing.String.Replace module, copied from
https://github.com/jamesdbrock/purescript-parsing-replace (#188 by @jamesdbrock)
streamEditT can be written in terms of replaceT.
streamEditT input sep editor = replaceT input (sep >>= editor >>> lift)
(#188 by @jamesdbrock, #194 by @jamesdbrock)
Add the advance and manyIndex combinators. (#193 by @jamesdbrock)
Bugfixes:
number and intDecimal. (#189 by @jamesdbrock)profunctor-lensesBreaking changes:
Proxy (#141 by @JordanMartinez)New features:
Bugfixes:
reindex for v0.15 due to [Purescript PR #4033](https://github.com/purescript/purescript/pull/4033)Other improvements:
assert (#135 by @neppord)united (#134 by @neppord)Lens vs ALens (#136 by @i-am-tom and @JordanMartinez)quickcheck-lawsBreaking changes:
Proxy2/Proxy3 usage in favor of just Proxy (#59 by @JordanMartinez)New features:
Other improvements:
reactBreaking changes:
Proxy (#185 by @JordanMartinez)routingOther improvements:
string-parsersBreaking changes:
withError operator to accommodate associativity changes in Control.Alt (#92 by @thomashoneyman)theseBreaking changes:
Proxy (#41 by @JordanMartinez)uriBugfixes:
valueFromString with lone surrogates (#68 by @ysangkok)Other improvements:
purescript-web LibrariescanvasBreaking changes:
Transform type now uses the field names a, b, c, d, e and f, instead of m11, m12, m21, m22, m31 and m32 (#86 by @artemisSystem)New features:
createImageDataWith (#81)Other improvements:
web-cssomBreaking changes:
Update CSSStyleDeclaration functions to take style arg last (#12 by @theqp)
This follows the convention of "the thing being operated on" occurs last in function that take multiple arguments.
web-domBreaking changes:
Effect for doctype (#52 by @JordanMartinez)getBoundingClientRect from web-html; set arg to Element (#53 by @JordanMartinez)web-eventsNew features:
CustomEvent constructor (#25 by @JordanMartinez)addEventListenerWithOptions to expose more options (#25 by @JordanMartinez)web-fileOther improvements:
Math import to use Data.Number (#20 by @JordanMartinez)web-htmlBreaking changes:
Move getBoundingClientRect to purescript-web-dom (#73 by @JordanMartinez)
Drop duplicated set/getClassName and classList (#74 by @JordanMartinez)
These three entities are already defined in purescript-web-dom
purescript-node Librariesnode-fs-affBreaking changes:
exists since the underlying Async.exists from purescript-node-fs has been removed (#36 by @sigma-andex)mkdir' to take options arg (#34 by @JordanMartinez)node-fsBreaking changes:
Remove Async.exists (#61 by @sigma-andex)
Update mkdir to take an options record arg, exposing recursive option (#53, #55, #58 by @JordanMartinez)
To get back the old behavior of mkdir', you would call mkdir' { recursive: false, mode: mkPerms all all all }
node-streamsBreaking changes:
write callback to include Error arg (#40 by @JordanMartinez)Other improvements: