This repo represents an attempt to unify the basic algebraic type classes from Spire and Algebird. By targeting just these type classes, we will distribute an
algebra package with no dependencies that works with Scala 2.10, 2.11, and 2.12, which can be shared by all Scala libraries interested in abstract algebra.
Since the creation of Algebra, we have also decided to interoperate with the Cats project. Algebra and Cats interoperate using the cats-kernel module.
Algebra supports Scala 2.10, 2.11, and 2.12, and is available from Sonatype (and Maven Central). In addition to the JVM, Algebra also supports Scala.js.
To use algebra in your own projects, include this snippet in your
libraryDependencies += "org.typelevel" %% "algebra" % "1.0.0"
If you want to use Algebra's laws, you can include those as well with this snippet:
libraryDependencies += "org.typelevel" %% "algebra-laws" % "1.0.0"
what we have so far
This repo has been seeded with most of the contents of
spire.algebra, and has been modified to fit an initially-conservative and shared vision for algebraic type classes. Discussions over removals and additions should take place on the issue tracker or on relevant pull requests.
Projects using Algebra
Anyone who wants to participate should feel free to open issues or send pull requests to this repo.
The following people are Algebra maintainers (i.e. have push access):
Please make a pull request against the
master branch. For those who can merge pull requests, we follow these rules:
Do not merge your own PR unless N people have signed-off on the PR (e.g. given a thumbs-up, +1, shipit, etc) and Travis is green.
If you are not the author, and you see (N - 1) sign-offs and Travis is green, just click merge and delete the branch.
Currently, N = 2.
Algebra uses type classes to represent algebraic structures. You can use these type classes to represent the abstract capabilities (and requirements) you want generic parameters to possess.
For a tour of the Algebraic structures that
algebra offers, see the extensive overview on the Algebra website.
Copyright and License
Copyright the maintainers, 2015-2016.