Skip to content
This repository was archived by the owner on Nov 29, 2020. It is now read-only.
/ scalaz-plugin Public archive

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

License

Notifications You must be signed in to change notification settings

scalaz/scalaz-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ff4c06c · Jun 15, 2019

History

73 Commits
Oct 4, 2018
Oct 4, 2018
Oct 4, 2018
Jun 15, 2019
Jun 15, 2019
Sep 5, 2018
Sep 5, 2018
Jun 29, 2018
Jun 15, 2019
Jun 29, 2018
Jun 24, 2018
Sep 25, 2018
Jun 15, 2019

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages