A small companion to cats
Failed to load latest commit information.
build.sbt standardize build files, separate version, remove pomextra Nov 14, 2016



Mouse is a small companion to the Cats functional programming library for Scala. It includes convenient syntax (aka extension methods) found in scalaz that are considered out of scope for Cats proper.

The library arose from this Cats issue and is a Typelevel incubator.

Mouse is published Scala 2.10, 2.11, 2,12. For Scala.jvm:

"com.github.benhutchison" %% "mouse" % version

For scala.js:

"com.github.benhutchison" %%% "mouse" % version

[Maven Central][search.maven]

Build Status


Mouse includes enrichments for:


scala> import mouse.all._
import mouse.all._

scala> true.option("Its true!")
res0: Option[String] = Some(Its true!)

scala> res0.cata(msg => s"Message received: ${msg}", "No message")
res1: String = Message received: Its true!

scala> "1.0".parseFloat
res0: cats.data.Xor[NumberFormatException,Float] = Right(1.0)

scala> "foo".parseIntValidated
res1: cats.data.Validated[NumberFormatException,Int] = Invalid(java.lang.NumberFormatException: For input string: "foo")

Release Notes

Version 0.6 (Nov 16) is built against cats 0.8.1 and migrates Xor boolean syntax to Either.

Version 0.5 (Aug 16) is built against cats 0.7.0 but otherwise unchanged.

Version 0.4 (July 2016) includes a breaking package rename from com.github.benhutchison.mouse -> mouse. Rationale was to follow cats and other modern libs convention of short, convenient package names.

Scope of Library

  • Provide enrichments to classes from the Scala standard library that convert to Cats datatypes, or otherwise improve the functional programming experience.

  • Make it easier to migrate source code between Scalaz and Cats.


Issues and pull requests are welcome. Code contributions should be aligned with the above scope to be included, and include unit tests.

This project supports the Typelevel code of conduct and aims that its channels (mailing list, Gitter, github, etc.) to be welcoming environments for everyone.