Upgrading dartz 0.6 to 0.7
Breaking0.6.3 → 0.7.5Breaking2New14Changed7Fixed2
BreakingUpgrade verdict
2 breaking changes.
In plain terms
- Some IMap and ISet functions and constructors that silently required keys or members to be comparable have been changed or removed, so code relying on them may need updates.
- Functions and constructors that quietly required comparable keys or members are changed or gone.
Must act 2 items need code or config changes
What you must change
Breaking2
Improves type safety for IMap and ISet by reworking or removing functions and constructors that implicitly assumed Comparable keys or members.
IMapISetComparableReworks and/or removes functions and constructors that implicitly assumed keys or members implemented Comparable.
ComparableAPI changes
Generated by DepDelta from published Dart source. Not mixed with prose notes.
- removed:
ctor FreeMonad() - removed:
ctor IMap.emptyWithOrder(this._order) - removed:
ctor IMap.fromWithOrder(Order<K> kOrder, Map<K, V> m) - removed:
ctor ISet.emptyWithOrder(Order<A> order) - removed:
ctor ISet.fromFoldableWithOrder(Order<A> order, Foldable foldable, fa) - removed:
ctor ISet.fromIListWithOrder(Order<A> order, IList<A> l) - removed:
ctor StateMonad() - removed:
field Free.(current) - removed:
field Free.current - removed:
function andThen<B>(Free<F, B> next): Free<F, B> - removed:
function flatMap<B>(Free<F, B> f(A a)): Free<F, B> - removed:
function operator <<(Free<F, dynamic> next): Free<F, A> - removed:
method Free.if(identical(current, currentBind)) - removed:
variable current: return - changed:
class FreeMonad<F> extends MonadOpsMonad<Free<F, dynamic>> → class FreeMonad<F> extends Functor<Free<F, dynamic>> with Applicative<Free<F, dynamic>>, Monad<Free<F, dynamic>> - changed:
class StateMonad<S> extends MonadOpsMonad<State<S, dynamic>> → class StateMonad<S> extends Functor<State<S, dynamic>> with Applicative<State<S, dynamic>>, Monad<State<S, dynamic>> - changed:
ctor IMap.empty() → ctor IMap.empty(this._order) - changed:
ctor IMap.from(Map<K, V> m) → ctor IMap.from(Order<K> kOrder, Map<K, V> m) - changed:
ctor IMap.fromIterables(Iterable<K> keys, Iterable<V> values, [Order<K> kOrder]) → ctor IMap.fromIterables(Iterable<K> keys, Iterable<V> values, Order<K> kOrder) - changed:
ctor IMapMonoid(this._vSemigroup) → ctor IMapMonoid(this._vSemigroup, this._kOrder) - changed:
ctor ISet.empty() → ctor ISet.empty(Order<A> order) - changed:
ctor ISet.fromFoldable(Foldable foldable, fa) → ctor ISet.fromFoldable(Order<A> order, Foldable foldable, fa) - changed:
ctor ISet.fromIList(IList<A> l) → ctor ISet.fromIList(Order<A> order, IList<A> l) - changed:
function comparableOrder<A>(): Order<A> → function comparableOrder<A extends Comparable>(): Order<A> - changed:
function eitherM<L, R>(): Monad<Either<L, R>> → function eitherM<L>(): EitherMonad<L> - changed:
function emptyMap<K, V>(): IMap<K, V> → function emptyMap<K extends Comparable, V>(): IMap<K, V> - changed:
function imap<K, V>(Map<K, V> m): IMap<K, V> → function imap<K extends Comparable, V>(Map<K, V> m): IMap<K, V> - changed:
function imapMi<K, V>(): Monoid<IMap<K, V>> → function imapMi<K extends Comparable, V>(): Monoid<IMap<K, V>> - changed:
function imapMonoid<K, V>(Semigroup<V> si): Monoid<IMap<K, V>> → function imapMonoid<K extends Comparable, V>(Semigroup<V> si): Monoid<IMap<K, V>> - changed:
function iset<A>(Iterable<A> l): ISet<A> → function iset<A extends Comparable>(Iterable<A> i): ISet<A> - changed:
function singletonMap<K, V>(K k, V v): IMap<K, V> → function singletonMap<K extends Comparable, V>(K k, V v): IMap<K, V> - changed:
method Applicative.lift2<A, B, C>(C f(A a, B b)): Function2 → method Applicative.lift2<A, B, C>(C f(A a, B b)): Function - changed:
method Applicative.lift3<A, B, C, D>(D f(A a, B b, C c)): Function3 → method Applicative.lift3<A, B, C, D>(D f(A a, B b, C c)): Function - changed:
method Applicative.lift4<A, B, C, D, E>(E f(A a, B b, C c, D d)): Function4 → method Applicative.lift4<A, B, C, D, E>(E f(A a, B b, C c, D d)): Function - changed:
method Applicative.lift5<A, B, C, D, E, F2>(F2 f(A a, B b, C c, D d, E e)): Function5 → method Applicative.lift5<A, B, C, D, E, F2>(F2 f(A a, B b, C c, D d, E e)): Function - changed:
method Applicative.lift6<A, B, C, D, E, F2, G>(G f(A a, B b, C c, D d, E e, F2 f)): Function6 → method Applicative.lift6<A, B, C, D, E, F2, G>(G f(A a, B b, C c, D d, E e, F2 f)): Function - changed:
method Applicative.lift<A, B>(B f(A a)): Function1 → method Applicative.lift<A, B>(B f(A a)): Function - changed:
method ComposedApplicative.map<A, B>(F fga, B f(_)): F → method ComposedApplicative.map<A, B>(F fga, B f(A _)): F - changed:
method ComposedFunctor.map<A, B>(F fga, B f(_)): F → method ComposedFunctor.map<A, B>(F fga, B f(A _)): F - changed:
method MonadOps.operator >>(F next): F → method MonadOps.operator >>(covariant F next): F - changed:
method MonadOpsMonad.bind<A, B>(F fa, F f(_)): F → method MonadOpsMonad.bind<A, B>(covariant F fa, covariant F f(_)): F - changed:
method MonadPlusOpsMonadPlus.empty(): F → method MonadPlusOpsMonadPlus.empty<A>(): F - changed:
method MonadPlusOpsMonadPlus.plus(F f1, F f2): F → method MonadPlusOpsMonadPlus.plus<A>(F f1, F f2): F - changed:
method Plus.plus(F f1, F f2): F → method Plus.plus<A>(covariant F f1, covariant F f2): F - changed:
method PlusEmpty.empty(): F → method PlusEmpty.empty<A>(): F - changed:
method PlusOps.plus(F fa2): F → method PlusOps.plus(covariant F fa2): F - changed:
method Traversable.foldMap<A, B>(Monoid<B> bMonoid, F fa, B f(a)): B → method Traversable.foldMap<A, B>(Monoid<B> bMonoid, F fa, B f(A a)): B - changed:
method TraversableOpsTraversable.foldLeft<A, B>(F fa, B z, B f(B previous, a)): B → method TraversableOpsTraversable.foldLeft<A, B>(F fa, B z, B f(B previous, A a)): B - changed:
method TraversableOpsTraversable.foldMap<A, B>(Monoid<B> bMonoid, F fa, B f(a)): B → method TraversableOpsTraversable.foldMap<A, B>(Monoid<B> bMonoid, F fa, B f(A a)): B - changed:
method TraversableOpsTraversable.foldRight<A, B>(F fa, B z, B f(a, B previous)): B → method TraversableOpsTraversable.foldRight<A, B>(F fa, B z, B f(A a, B previous)): B - added:
class Pure<F, A> extends Free<F, A> - added:
ctor IHashMap.fromPairs(FoldableOps<dynamic, Tuple2<K, V>> foldableOps, Order<K> kOrder) - added:
ctor IMap.fromPairs(FoldableOps<dynamic, Tuple2<K, V>> foldableOps, Order<K> kOrder) - added:
ctor ISet.fromIterable(Order<A> order, Iterable<A> i) - added:
ctor Pure(this.a) - added:
field Pure.a: final A - added:
function emptySet<A extends Comparable>(): ISet<A> - added:
function emptySetWithOrder<A>(Order<A> order): ISet<A> - added:
function imapMonoidWithOrder<K, V>(Semigroup<V> si, Order<K> order): Monoid<IMap<K, V>> - added:
function isetWithOrder<A, A2 extends A>(Order<A> order, Iterable<A2> i): ISet<A> - added:
get IMap.order: Order<K> - added:
method Either.filter(bool predicate(R r), L fallback()): Either<L, R> - added:
method Either.where(bool predicate(R r), L fallback()): Either<L, R> - added:
method EitherLens.modifyEC(Function1<B, B> f): Function1<A, Either<E, A>> - added:
method Evaluation.replace<B>(B replacement): Evaluation<E, R, W, S, B> - added:
method Free.andThen<B>(Free<F, B> next): Free<F, B> - added:
method Free.flatMap<B>(Free<F, B> f(A a)): Free<F, B> - added:
method Free.foldMap<M, MA extends M>(Monad<M> m, M f(F fa)): MA - added:
method Free.operator <<(Free<F, dynamic> next): Free<F, A> - added:
method Free.step(): Free<F, A> - added:
method IList.where(bool predicate(A a)): IList<A> - added:
method IMap.cata<B>(B z, B ifEmpty(B b), B ifNonEmpty(B b, K k, V v, B cataLeft(B b), B cataRight(B b))): B - added:
method IMap.getKey(K k): Option<K> - added:
method IMap.mapKV<V2>(V2 f(K k, V v)): IMap<K, V2> - added:
method IMap.traverseKV<G>(Applicative<G> gApplicative, G f(K k, V v)): G - added:
method IMap.traverseKV_<G>(Applicative<G> gApplicative, G f(K k, V v)): G - added:
method IMap.traverse_<G>(Applicative<G> gApplicative, G f(V v)): G - added:
method IVector.filter(bool predicate(A a)): IVector<A> - added:
method IVector.flatMap<B>(IVector<B> f(A a)): IVector<B> - added:
method IVector.foldLeftWithIndexBetween<B>(int minIndex, int maxIndex, B z, B f(B previous, int index, A a)): B - added:
method IVector.foldRightWithIndexBetween<B>(int minIndex, int maxIndex, B z, B f(int index, A a, B previous)): B - added:
method IVector.where(bool predicate(A a)): IVector<A> - added:
method Lens.modifyC(Function1<BOut, BIn> f): Function1<AIn, AOut> - added:
method Lens.setC(BIn b): Function1<AIn, AOut> - added:
method MonadPlus.where(F fa, bool predicate(a)): F - added:
method MonadPlusOps.where(bool predicate(A a)): F - added:
method Option.filter(bool predicate(A a)): Option<A> - added:
method Option.isNone(): bool - added:
method Option.isSome(): bool - added:
method Option.where(bool predicate(A a)): Option<A> - added:
method OptionLens.modifyOC(Function1<B, B> f): Function1<A, Option<A>> - added:
method Pure.fold<R>(R ifPure(A a), R ifSuspend(F fa), R ifBind(Free<F, dynamic> ffb, Function1<dynamic, Free<F, A>> f)): R - added:
method StateT.replace<B>(B b): StateT<F, S, B> - added:
static method IList.flattenIList<A>(IList<IList<A>> ffa): IList<A> - added:
static method IList.flattenOption<A>(IList<Option<A>> oas): IList<A> - added:
static method IVector.flattenIVector<A>(IVector<IVector<A>> ffa): IVector<A> - added:
static method IVector.flattenOption<A>(IVector<Option<A>> oas): IVector<A>
- added:
method Conveyor.appendElement(O o): Conveyor<F, O> - added:
method Conveyor.prependElement(O o): Conveyor<F, O> - added:
method Conveyor.where(bool f(O o)): Conveyor<F, O>