September 6, 2008, Saturday, 249

Scalaz Changes

From Workingmouse Wiki

Jump to: navigation, search

HEAD (pending release) Artifacts Source

  • No changes yet

Version 3.0 Artifacts Source

  • A rewrite, particularly the control package

Version 2.4 Artifacts Source

  • Added the ability to determine the version:
    • scala -classpath scalaz.jar scalaz.Version
  • Fixed "tar bomb" issue - release file now extracts to its own subdirectory.
  • Altered scala.Either to be more reflective of bug 251 against core Scala libraries.
  • Fixed bugs in scalaz.Equal.
  • Added many functions to scalaz.LList (the List wrapper)
    • list [X](nil : => X, cons : (A, scala.List[A]) => X) : X
    • scanLeft [B](b : B)(f : (B, A) => B) : scala.List[B]
    • scanLeft1 (f : (A, A) => A) : scala.List[A]
    • scanRight [B](b : B)(f : (A, B) => B) : scala.List[B]
    • scanRight1 (f : (A, A) => A) : scala.List[A]
    • zipN functions (3 to 7)
    • zipWithN functions (3 to 7)
  • Added functions to scalaz.control.Foldable
  • Compiled with Scala 2.7.0-RC2

Version 2.3.1 Artifacts Source

  • Updated demo code to extend Application so that they were runnable
  • Added lots of demo code samples
  • Fixed some minor bugs
  • Added a few useful functions

Version 2.3 Artifacts Source

  • Added functions to scalaz.control.Monad
    • def sum[F[_], M[_], A](as: F[M[A]])(implicit f: Foldable[F], m: MonadPlus[M]): M[A]
    • def filterM[A, M[_], F[_]](f: A => M[Boolean], as: F[A])(implicit m: Monad[M], fd: Foldable[F], mp: MonadPlus[F]): M[F[A]]
    • def foldM[A, B, M[_], F[_]](f: (B, A) => M[A], a: A, bs: F[B])(implicit m: Monad[M], fd: Foldable[F]): M[A]
    • def guard[M[_]](c: Boolean)(implicit m: MonadPlus[M]): M[Unit]
    • def when[M[_]](c: Boolean, s: M[Unit])(implicit m: MonadPlus[M]): M[Unit]
    • def unless[M[_]](c: Boolean, s: M[Unit])(implicit m: MonadPlus[M]): M[Unit]
  • Added functions to scalaz.control.MonadPlus
    • def replicate[A, M[_]](n: Int, a: A)(implicit m: MonadPlus[M]): M[A]
  • Added some and none functions to construct Options
  • Added Wrapper around Unit
    • Added unless function; println("foo") unless false // prints foo (since false)
  • Renamed scalaz.Bool.ifT to unless
  • Added lift functions to scalaz.Either
  • Added scalaz.LList to wrap scala.List and provide additional functions.
  • Added scalaz.Stream to wrap scala.Stream and provide additional functions.
  • Added scalaz.io package with functions to work over files.
  • Added scalazdemo package to etc/demo for code examples. Demo
  • Added source links and style to in scaladoc

Version 2.2 Artifacts Source

  • Compiled with Scala 2.6.1
  • Updated tests to use ScalaCheck 1.1.1
  • Control library changes
    • Introduced Paramorphism abstraction
      • List and Stream Paramorphism implementations
      • Paramorphism implementation given a Foldable and MonadPlus
      • dropWhile, span, break functions over any Paramorphism
      • Some updates to Monad and Functor
    • takeWhile function over any Foldable producing any MonadPlus
    • asMap function over any Foldable, producing a Map of keys with values of any Semigroup (over the value type) and Monad
  • Complete reworking of scalaz.validation (Ticket).
    • Introduced the Parse object which wraps the String to primitive type parse functions (e.g. Integer.parseInt) to return Either[Throwable, JavaPrimitiveType] instead of throwing an exception
  • New functions on scalaz.Either
    • mapIf and mapIfLeft
    • Renamed x and y to +> and +< respectively
    • leftRights on Either object
    • iif on Either object
  • New functions on Maybe/Option
    • forall, join
    • Removed toBoolean since it is redundant
    • Renamed fromBoolean to iif for consistency
  • New Prelude functions
  • ifT and ifF

Version 2.1 Artifacts Source

  • First public release
  • Compiled with Scala 2.6.0