Skip to content

7.1.0 M1

xuwei-k edited this page May 16, 2017 · 30 revisions

This release is not binary compatible with 7.0.0.

Built against Scala 2.9.3 and 2.10.1. No 2.11 support yet.

New features

  • scalaz-concurrent: add a Timer for timeouts with Future (#321)
  • new Lens methods: modo and assigno which modify and return the old value (#324)
  • scalaz-example: new ST and Writer examples (#353)
  • maximumBy and maximumOf methods on Foldable (and minimum* equivalents, and Foldable1 equivalents) (#354, 8dcfa1a98e)
  • runM method on Free for running it in another monad (9445438a17)
  • smart constructor for Nil (1b563d8588)
  • Show instance for java.lang.Throwable, needs to be imported explicitly (5db73d4a4d)
  • add groupBy1, resulting in a Map containing NonEmptyList values (#361)
  • add excepting method on Validation to filter the Success side; generalizes ensure (#360, cf9b415d4a)
  • add foldRight1Opt on Foldable (similar to foldRight1 on Foldable1, but returning an Option) (and Left and curried equivalents) (#362, f121c98fc3)
  • mapM method on StreamT, threads a per-element monadic effect through the stream (#363)
  • Equal instance for arbitrary Java enums (4cb886097c, #359)
  • some additional product/compose methods on type classes (394f190f79)
  • xhoist and contracohoist for Cont (#374)
  • Cobind and Cojoin instances for List and Option (8668507471, c9ab4bdab9)
  • new syntax for Cobind and Cojoin: coflatMap and coflatten as aliases for cobind and cojoin (bae7f5713b)
  • Unapply variant for liftM: liftMU (#378)
  • safe init and last for NonEmptyList (#380)
  • new syntax for fold (3b68ab66fb)
  • a version of traverse where a subsequent monadic join is applied to the inner result: traverseM (#368)
  • new type class: InvariantFunctor (#351, experimental)
  • Cojoin and Cobind instances for Stream, LazyOption, Function1 and tests (#387, #388)
  • Monoid instance for FingerTree (#389)
  • scalaz-iteratee: generalized enumReader to enumIoSource and provide enumInputStream (#366)
  • sorting functions on NonEmptyList (#405)
  • Show instance for LazyOption (#416)
  • new to method on Foldable, allows construction of arbitrary Scala collections (#420)

Subject to further changes

  • NullArgument and NullFunction: specialized versions of Kleisli and Cokleisli for Option
  • new OnePlus data type, generalizes NonEmptyList (#348)
  • new Endomorphic data type, generalizes Endo (#384)
  • rename OnePlus to OneAnd and introduce OneOr (#412, #419, and more)

Changed features

  • building against Scala 2.10.1 instead of Scala 2.10.0, use 2.10.1 as default version (#296)
  • tuned function0Instance and function1Instance (#319)
  • optimisation for Future.run (#320)
  • fix ambiguity for Functor instance in OptionT and IdT (#322, 0fef6e514f)
  • add Traverse1 and Foldable1 ops to the all-ops trait (#327)
  • override foldMap1 in NonEmptyList to avoid StackOverflowError (#332)
  • fix Equal[Map[K, V]] instance (fceb867e65)
  • fix superfluous type parameters in toValidationNel (cfa6d48e75)
  • prevent evaluating second parameter in Option's Semigroup twice (#352)
  • fix Index[IndexedSeq] and Index[List] (8585cfc6e8)
  • fix composition of ApplicativePlus which violated the laws, new implementation identical to Haskell implementation (#364)
  • scalaz-iteratee: generalize enumArray to enumIndexedSeq (#365)
  • change name of ToIdOps to ToEffectIdOps to avoid naming collisions (43bf9e839d)
  • mutableMapMemo and immutableMapMemo become public methods (#379)
  • remove superfluous type parameter in sequence_ (b1bc25f604)
  • fix Comonad[Function1] instance (#385)
  • performance optimization: toList method on Foldable[List] is now identity, and similarly for IndexedSeq, Set and Stream (#386)
  • actors: clearing of last processed message from tail node to avoid memory leaks (#396)
  • fix infinite loop in EphemeralStream#traverse (#398)
  • put Semigroup instances for Dual into implicit scope (#399)
  • relax Applicative constraint to Apply for liftSemigroup (#400)
  • performance: less object allocations (#402)
  • remove unneeded evidence parameters on some ListT instances (#403)
  • fix += method on NumericPLens (#404)
  • remove unneeded evidence parameters on some Cofree instances, put Cofree instances into implicit scope (#409)
  • remove Endo#fix (only produced ⊥), introduce a proper fix function with by-name parameters (#410)
  • more trampolining in IO (bb4ebd6501)
  • fixed issue where task would incorrectly run(fork) (#423)
  • optimize foldRight1 on NonEmptyList, avoids stack overflow (#425)
  • relax constraints of HeapFunctions#sort and HeapFunctions#sortWith (#426)

Deprecations

  • for consistency, renamed groupByM to groupWhenM, groupByM is now a deprecated alias for groupWhenM (#361, 775d0f37c4, cdd41097c2)
  • syntax enrichments which create instances of \/ and NonEmptyList are now in their own objects, and the old ones in scalaz.syntax.id._ are deprecated. Use import scalaz.syntax.nel._ and import scalaz.syntax.either._ now. To avoid ambiguities, the new ones are not included in the all-syntax object. (#370)
  • remove superfluous type parameter in foldMapIdentity and deprecate in favour of fold (#377, 3b68ab66fb)
  • deprecate Length, Each and Index, introduce default implementations in Foldable (#392)

Incompatible changes

  • Unapply: instead of just a conversion, require a Leibniz instance (#325)

    Migration strategy: If you define your own Unapply instances, it is probably as simple removing apply and adding the line def leibniz = refl. See the commit in the pull request for examples.

  • remove ^ method from FunctorOps (#326)

    Migration strategy: use map or one of the other countless aliases instead

  • changed behaviour of nand and nor (#339, warning: source compatible)

    Migration strategy: review your code for occurrences of nor, nand, !|| and !&&.

  • remove some variance annotations (#328, #383)

    Migration strategy: some parts relied, and still rely on a scalac bug. However, if your types have variance annotations, your instance definitions should still compile. See the discussions on the mailing list for details.

  • remove deprecated iterv compatibility module (#340)

    Replacement: iteratee module

  • remove some deprecated syntax on Apply (#340)

    Migration strategy: use the suggested alternatives from the deprecation messages

  • remove MetricSpace and BKTree (#347) (postponed to 7.2, deprecated in 7.1)

    Migration strategy: For MetricSpace, consider using spire. BKTree has no replacement as of now. If needed, it can be resurrected in scalaz-contrib. This is an ongoing effort to reduce redundancy between spire and scalaz.

  • remove Monoid[Float] and Monoid[Double] (#346)

    Migration strategy: For numerical programming, consider using spire. This is an ongoing effort to reduce redundancy between spire and scalaz.

  • Slight alterations in the type class inheritance hierarchy for categories. Split is not a Category anymore, just a Compose. Arrow is still a Category.

    Migration strategy: For functions which require a type argument to be a Split, you might need to add an additional Category constraint. You can also change Split to Arrow, depending on the use case.

  • Some tunings in StreamT. Removed StreamTMonad in favour of StreamTMonadPlus, which has weaker requirements. (#406)

    Migration strategy: Replace occurrences of StreamTMonad by StreamTMonadPlus.

  • Drop 2.9.2 build. (b4404bf8d1)

    Migration strategy: Move to 2.9.3. Artifacts built against 2.9.2 can still be used with 2.9.3.

Clone this wiki locally