My favorites | Sign in
Project Home Wiki
Project Information
Members
Links

The source for Scalaz is now hosted on GitHub - http://github.com/scalaz/scalaz

Scalaz is a library written in the Scala Programming Language. The intention of Scalaz is to include general functions that are not currently available in the core Scala API. The scalaz-core module depends only on the core Scala API and the core Java 2 Standard Edition API. Scalaz is released under a BSD open source licence making it compatible with the licence of the Scala project.

Scalaz 6.0.4 was released in January 2012, targeting Scala 2.8.1, 2.9.0.1, 2.9.1 and 2.10.0-M1. Full download for 2.9.1

Scalaz 7 is currently being developed. This is a rewrite to address the challenges posed by type class inheritance. The first release of this series is expected in April 2012.

Community

Presentations

Links

Features

Scalaz and the Pimps

  • object Scalaz for single-import access to all functions and implicits provided by the library.
  • import scalaz._
    import Scalaz._
    // profit!

  • The general purpose 'Pimps of Scalaz', that provide general purpose functions and allow object-oriented style syntax, for example 1.pure[List] or List(1, 2, 3).suml
    • Identity wraps any value.
    • MA wraps values based on a type constructor of kind * -> *, e.g List[Int]
    • MAB wraps values based on a type constructor of kind (*, *) -> *, e.g Either[String, Int]

Type Classes

  • An implementation of common type-classes
    • Equal - for doing type-safe (and configurable) equality checks
    • Show - for type-safe configuration of display for types (like Java's toString but with a compile-time check for existence and easier to use)
    • Order - type-safe comparisons for ordering
  • An implementation of a covariant binary functor (Bifunctor) for mapping over either (or both) side of a pair or scala.Either, scala.Tuple2, or similar. Example
  • A Monoid type class and (so many!) implementations
  • Memo A memoisation library for automatically storing the result of computations (especially useful for Dynamic Programming Algorithms)

Data Structures

  • NonEmptyList, a data type for representing one or more elements of the same type that guarantees successful termination of head, tail and other operations
  • DList, a data type for representing elements of the same type with constant time append/prepend operations.
  • A multi-way Tree (rose tree) and a one-hole zipper (TreeLoc) for tree traversal.
  • Zipper, a pointed list (zipper list) data type
  • A data type (State) for representing state transition through a value i.e. a function: S => (S, A) | Example
  • Finger Trees

Concurrency

  • Promise and Actor, a light-weight and highly configurable concurrency library with actors and non-blocking composable future values. Presentation | Example

Integration

Obtaining Scalaz

Releases are also published to: http://scala-tools.org/repo-releases/org/scalaz. The scalaz-full module contains the full distribution (all modules, Scaladoc, and annotated sources)

Snapshots are periodically published to Scala Tools

SBT

  // Only needed to track snapshot releases, SBT automatically includes the releases repository.
  resolvers += "Scala Tools Snapshots" at "http://scala-tools.org/repo-snapshots/"

  libraryDependencies += "org.scalaz" %% "scalaz-core" % "6.0.4"

Maven

<repositories>
  <repository> 
    <id>scala-tools-releases</id> 
    <name>Scala-Tools Maven2 Repository Releases</name> 
    <url>http://scala-tools.org/repo-releases</url> 
  </repository> 
  <repository> 
    <id>scala-tools-snapshots</id> 
    <name>Scala-Tools Maven2 Repository - Snapshots</name> 
    <url>http://scala-tools.org/repo-snapshots</url> 
  </repository> 
</repositories>
<properties>
  <scala.version>2.9.1</scala.version>
</properties>
<dependencies>

  <dependency>
    <groupId>org.scalaz</groupId>
    <artifactId>scalaz-core_${scala.version}</artifactId>
    <version>6.0.4</version>
  </dependency>
</dependencies>

Issues

https://github.com/scalaz/scalaz/issues

Hacking

Source: http://github.com/scalaz/scalaz Continuous Integration: http://hudson.scala-tools.org/view/scalaz/?

Thanks

Thanks to the Scala core team for the improvements in Scala 2.8.0 which have made Scalaz leaner and meaner. We're looking forward to further improvements in type inference, implicit resolution, and higher kinded types in future releases!

  • Thanks JetBrains for helping us to bring our users the best library we can. JetBrains provides contributors to Scalaz with a licence to use Intellij IDEA for our open source production of Scalaz.

YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products:

Powered by Google Project Hosting