Scalaz 7: instances moved out of companion objects and into scalaz.std
Principled Functional Programming in Scala
At a glance
- What is it?
- Scalaz is a Scala library of type classes and functional data structures, currently 7.3.9. Version 7 was a reorganization rather than a feature release: instances moved into a package you must import, syntax moved behind an opt in, and two sub-projects became separate artifacts, which is why the import list in a version 6 file does not compile unchanged.
- Who is it for?
- Scalaz suits a Scala team that wants the type class hierarchy itself rather than a small set of abstractions, and that is prepared to import instances explicitly so ambiguity is visible in the import list instead of at compile time.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 5 days ago.
- What is it written in?
- Mainly Scala, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- scalaz/scalaz4,670 ★ · +4
| Repository | 2026-09-23 | 2026-11-15 |
|---|---|---|
| scalaz/scalaz | 4.7k | 4.7k |
4 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
7.3.9 is cross-built for four Scala targets and two that are not the JVM
The current stable version is 7.3.9, and it is cross-built against Scala 2.12.x, 2.13.x, 3.x and Scala.js, scala-native. That last pairing is the one to notice: the same artifact is expected to work on the JVM, in a browser and in a native image, which is why the dependency coordinates use the `%%` cross-version suffix in the SBT line:
libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.3.9"Maven and other build tools are pointed at a search rather than a snippet, with a link to the scalaz-core_3 artifact on Maven Central, and the README notes that the same search lists every available module. That page is also where the sample configurations and the direct download links live, and the instruction is to choose the file ending in `7.3.9.jar`.
The build in the repository matches that story. There is a `build.sbt`, a `project/` directory, a checked in `sbt` launcher script, a `version.sbt`, plus `.java-version` and `.jvmopts` for the toolchain. There is no releases page on this repository, so the version is not something you discover from a tag; it is stated in the README.
Instances for standard library types now live in scalaz.std and must be imported
This is the change that breaks version 6 code first. Type class instances are no longer defined in the companion objects of the type class. Instances for standard library types are defined under `scalaz.std`, and they have to be imported, while instances for Scalaz's own data types stay in the companion object for those types.
The reason given is not style. An instance definition can now provide multiple type classes in a single place, which was not always possible in Scalaz 6, and instances have been organised to avoid ambiguity, a problem that arises when instances depend on other instances, with `Monoid[(A, B)]` given as the example.
The import list is where this shows up at the call site. The quick start imports `std.option._` and `std.list._` for the functions and instances of Option and List, and the README is explicit that it has gone to great lengths to offer an a la carte importing experience. There is also an all you can eat option for people who prefer it, by importing the `Scalaz._` object:
import scalaz._
import Scalaz._
scala> 1.node(2.leaf, 3.node(4.leaf))
res1: scalaz.Tree[Int] = <tree>
scala> List(some(1), none).suml
res2: Option[Int] = Some(1)Constructive implicits were removed on purpose
One removal is worth singling out because it is the kind of change that gets described as a bug fix and behaves like a redesign. Constructive implicits, which created a type class instance automatically from instances of all parent type classes, are gone. The stated reason is that they led to subtle errors with ambiguous implicits, with a link to a concrete FunctorBindApply problem report as the example.
What replaced them is more work for the library author and less ambiguity for the compiler. A single implicit can define a number of type class instances for a type, instances are defined in traits that get mixed together into an object for importing en masse, and a type class definition can override methods, including derived methods, for efficiency. That last point is visible in the Option instance the README walks through, where the derived `map` is overridden to delegate to the collection's own `map` instead of rebuilding it:
implicit val option: Traverse[Option] with MonadPlus[Option] = new Traverse[Option] with MonadPlus[Option] {
def point[A](a: => A) = Some(a)Two type classes, `Traverse` and `MonadPlus`, are declared by one implicit here. In version 6 that pairing was awkward, which is the whole point of the change.
The hierarchy is the same as version 6, so signatures are the thing that moved
Type classes still form an inheritance hierarchy, as they did in Scalaz 6, and the README keeps the argument for it: it is convenient at the call site and at the instance definition site, and it means a method needing a general type class can be called with an instance of a more specific one.
def bar[M[_]: Functor] = ()
def foo[M[_]: Monad] = bar[M] // Monad[M] is a subtype of Functor[M]The hierarchy itself is described as largely the same as in Scalaz 6. What changed is method signatures: some have been adjusted to support better standalone usage of the type class, and code depending on those signatures will need to be re-worked.
The broader move is related functions into the type class trait, to support standalone usage. In Scalaz 6 those functions lived in `Identity`, `MA` or `MAB`. That is a real ergonomic gain and also a source level break for anyone who was importing those helpers directly, so the migration cost of Scalaz 7 is concentrated in exactly these two places: imports and signatures.
effect and iteratee became separate artifacts, http and geo were dropped
Scalaz has been modularised, and the module list is short enough to hold in your head. `scalaz-core` is the type class hierarchy, the data structures, the instances for the Scala and Java standard libraries, and the implicit conversions and syntax to reach them. `scalaz-effect` holds data structures to represent and compose IO effects in the type system. `scalaz-iteratee` is an experimental new Iteratee implementation.
Two packages were split out and two disappeared. `scalaz.effect` and `scalaz.iteratee` were split into separate sub-projects, and `scalaz.http` and `scalaz.geo` were dropped outright.
The repository layout matches: `core/`, `effect/` and `iteratee/` are directories at the top level, next to `etc/`, `scalacheck-binding/`, `example/` and `tests/`. So an upgrade that keeps only `scalaz-core` is now an explicit choice rather than a default, and the code that used to sit in the same artifact as the type classes is a separate dependency to declare.
New data structures have been added and existing ones generalized as part of the reorganization, and a number of monad transformers have been provided, in some cases generalizing older data structures. That is the part of version 7 that adds capability rather than moving things around.
Syntax is opt in, and the Ops classes live under scalaz.syntax
Implicit views that give you Scalaz functionality as extension methods have been segregated into `scalaz.syntax`. They can be imported selectively, and they need not be used at all. The `Ops` classes are defined under that package.
import scalaz._
import std.list._ // type class instances for List
import syntax.bind._ // syntax for the Bind type class (and its parents)
scala> List(List(1)).join
res0: List[Int] = List(1)
scala> List(true, false).ifM(List(0, 1), List(2, 3))
res1: List[Int] = List(0, 1, 2, 3)Two imports, two different jobs: `std.list._` brings the instances for List, `syntax.bind._` brings the syntax for the Bind type class and its parents. The `ifM` example is the clearest illustration, since it returns one of two lists depending on a boolean list and neither of those ideas is a method on List itself.
Because syntax is optional, the same program can be written with no syntax at all by naming the type class, which is what the first quick start does with `Apply[Option].apply2` and `Traverse[List].traverse`. Pick one style per file. Mixing them in a codebase is how a library ends up with two ways to do everything and one documented path.
No releases page, so the version and the migration notes live elsewhere
This repository has no GitHub releases. The last push to master was on 2026-11-02 and the version you should use is stated in the README, 7.3.9.
That arrangement is why the resource list matters more than usual. The wiki is described as containing release and migration information, alongside the README's own summary of changes in version 7. The Scaladocs at scalaz.github.io are the API reference, and the examples module in the repository, under `example/src/main/scala/scalaz/example`, holds usage snippets rather than a separate example project.
For conversation there is an IRC channel on irc.libera.chat, named #scalaz, and a mailing list on Google Groups. For background reading the README points at the typelevel blog, including a post called Towards Scalaz from 2013, and at the Learning Scalaz series by Eugene Yokota.
One housekeeping note: the licence file at the root is `LICENSE.txt`, so check that file for the terms rather than assuming what a library of this age uses.
Editorial conclusion
Scalaz suits a Scala team that wants the type class hierarchy itself rather than a small set of abstractions, and that is prepared to import instances explicitly so ambiguity is visible in the import list instead of at compile time. It does not suit a codebase that wants its dependencies to work without configuration, because the scalaz.std imports are mandatory, and it does not suit a library author who needs a stable set of extension methods, since syntax is deliberately opt in. Before you migrate, read the wiki page on migration information, check that your effect handling fits the separate scalaz-effect artifact, and pick the jar ending in 7.3.9 from the module listing rather than the newest one you find.
Frequently asked questions
How do I add Scalaz to an SBT build?
Add `libraryDependencies += "org.scalaz" %% "scalaz-core" % "7.3.9"` to the build file. Maven and other tools are pointed at the Maven Central page for the scalaz-core_3 artifact, and that search also lists every available module.
Which Scala versions does Scalaz support?
The current stable version 7.3.9 is cross-built against Scala 2.12.x, 2.13.x, 3.x, Scala.js and scala-native. In SBT that is why the dependency line uses the `%%` cross-version suffix.
What changed between Scalaz 6 and Scalaz 7?
Version 7 was a reorganization. Instances for standard library types moved out of the type class companion objects into the package `scalaz.std` and must be imported, syntax moved to `scalaz.syntax` and became optional, `scalaz.effect` and `scalaz.iteratee` became separate sub-projects, `scalaz.http` and `scalaz.geo` were dropped, and constructive implicits were removed.
What are the Scalaz modules?
Three are described: `scalaz-core` for the type class hierarchy, data structures, standard library instances and syntax, `scalaz-effect` for data structures that represent and compose IO effects in the type system, and `scalaz-iteratee` as an experimental new Iteratee implementation.
Where can I find Scalaz examples and migration notes?
The examples module in the repository sits under `example/src/main/scala/scalaz/example`, the API reference is the Scaladoc at scalaz.github.io, and the wiki holds release and migration information. Conversation happens on IRC #scalaz at irc.libera.chat and on the Google Groups mailing list.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/scalaz-scalaz)Star history chart for your README
[](https://hysenlabs.com/projects/scalaz-scalaz)Was this useful?