Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Incompatibility of ioTimer in Cats interop #587

@ghostdogpr

Description

@ghostdogpr

Cats' ConcurrentEffect[F] requires a Timer[F].
There was in our catz interop an implicit def ioTimer that returned a Timer[Task].

With the new ZIO Environment, ioTimer is defined as below:

implicit def ioTimer[R <: Clock, E]: effect.Timer[ZIO[R, E, ?]] = new effect.Timer[ZIO[R, E, ?]]

It returns a Timer[ZIO[R, E, ?] with R <: Clock, but this doesn't match the definition of Task.

Shall we use Clock.Live directly instead of relying on an environment here? Or require an implicit parameter Clock as it was before? Any other suggestion?

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