Skip to content

v1.0.0

Compare
Choose a tag to compare
@djspiewak djspiewak released this 08 Sep 19:44
v1.0.0
7368ce4

This release contains a full rewrite of… everything. It is not binary compatible with 0.7.x or any of the previous releases, nor is it source-compatible, but most of the changes should be relatively straightforward to adapt to on the usage side. This rewrite was not undertaken lightly, and it is hoped that the advantages which come from it are deemed worth the short-term inconvenience of upgrade pain. The major changes are as follows:

  • Renamed all typeclasses to be more concise and to avoid needing to understand implementation details (e.g. Ask rather than FunctorAsk)
  • Added variance to relevant classes (e.g. Ask and Raise), which ensures more robust usability in most cases. This is particularly helpful when working with an instance of Raise[F, Throwable], which now allows the use of the raise[F] syntax directly on all subtypes of Throwable, exactly as you would expect. This also makes it much easier to compose Ask instances together when both instances are using subtyping as a mechanism for subsetting some environmental context (a common technique in dependency injection).
  • Removed all ControlLayer typeclasses in favor of more direct derivation. This imposes a slightly higher cost in terms of boilerplate for class authors, but provides much greater control for both users and authors while avoiding the import tax. To this point, it is no longer necessary to import cats.mtl.implicits._ unless you want access to the syntax, in which case cats.mtl.syntax.all._ is probably a better approach.
  • Added MonadPartialOrder. This is a generalization of the Hoist typeclass in many ways, though not quite as general as ApplicativeK or similar. It is mostly used as an implementation detail in MTL instance derivation, but it can also be quite useful in user-land code for representing when a monad "contains" another monad's effects.
  • …probably other nice things!

One major omission for the moment is that documentation has not been updated at present. This requires some more work, but we didn't want to hold up all the goodies of 1.0 pending that rework. Expect more changes in the coming days!