Skip to content
A compiler plugin that will improve on the scala compiler on the assumption that the user is using the Scalazzi-safe subset of Scala.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
meta/shared/src/main/scala/scalaz/meta
plugin/src/main
project
test
.codecov.yml
.gitignore
.scalafmt.conf
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
build.sbt

README.md

Scalazzi compiler plugin

Join the chat at https://gitter.im/scalaz/scalaz-plugin

A compiler plugin that improves on the scala compiler on the assumption that the user is using the Scalazzi-safe subset of Scala.

What does this plugin do?

See test/files for more examples. We would like to get a lot more things done eventually, see open issues.

What is Scalazzi

  • No null.
  • No catching exceptions in pure code.
  • No type casing (isInstanceOf).
  • No type casting (asInstanceOf).
  • No side-effects.
  • No equals, toString, hashCode.
  • No notify or wait in pure code.
  • No .getClass.

We are more interested in Scalazzi+, which adds:

  • Only total functions.
  • Eq (used in laws and pattern matching) must satisfy:
    • Identity of indiscernibles (indiscernible values are equal).
    • Indiscernibility of identicals (equal values are indiscernible from each other).

The last requirement might seem a bit cryptic, but it has a wide range of implications, for example:

if (a === b) {
  // now we know that a.type === b.type
}

Other great compiler plugins you should check out

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.