-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Milestone
Description
Many of the components of the library have the constructor in the following form:
class Component[F]
object Component {
def apply[F[_]: SomeConstraints]: F[Component[F]]
}
The problem with this form of a constructor is that the initialization effect and execution effect are the same effects. But in fact, they may be different. Moreover, they may have different constraints.
I suggest to change in 2.0.0 all these constructors to the following form:
class Component[F]
object Component {
def apply[F[_]: ExecConstraints, G[_]: InitConsraints]: G[Component[F]]
}
This change will be especially helpful for the complex tagless final codebases which use multiple different reader-like effects in the same codebase.
bplommer
Metadata
Metadata
Assignees
Labels
No labels