Skip to content

Bike shedding #1

@mpilquist

Description

@mpilquist
  • Remove cats.effect.Attempt alias. It's currently private[effect] which is confusing for folks reading the code. We could make it public but I don't think an effect library should provide a minor syntax convenience like this.
  • Replacing Catchable with MonadError means we lose this method:
  def attempt[A](fa: F[A]): F[Attempt[A]]

This is commonly used in FS2. I suppose the right thing to do here is PRing this method to MonadError in cats.

  • We need unsafeRunAsync somewhere -- either on Effect or perhaps on a subtype of Effect if we want to limit where it might be invoked via parametric polymorphism.
  • Not sure how I feel about StdIO -- seems like a bucket of random things for which there's no guiding principle on deciding what should be added. E.g., how about randomUUID: IO[UUID]?
  • Change IO from a sealed trait to a sealed abstract class to help with binary compat issues in the future.
  • Note that we are switching to scala.util.control.NonFatal instead of fs2.util.NonFatal. I'm fine with this but both Paul and Daniel supported using a custom notion of NonFatal that didn't catch ControlException and some others.
  • Probably should think of a new name for IO#ensuring given the ensuring from Predef
  • To make sure I've got it right, Task.delay is now IO.apply and Task.apply doesn't exist, right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions