Closed dnaumenko closed 6 years ago
We could probably generate a default version which will use an Identity monad for convenience, so the current behavior will look like:
You can use Id
alias to recover original definition without needing a wrapper.
type Id[A] = A
trait Noop[F[_]] {
def noop: F[Unit]
}
class NoopImpl extends Noop[Id] {
def noop: Unit = ()
}
Currently, the codegen for Service domain produces a service when each method accepts an
InputType
and returns anOutputType
.I propose to make it more general by introducing a higher-kinded type F and make all service methods return not
OutputType
, butF[OutputType]
instead.An example for generated code:
We could probably generate a default version which will use an
Identity
monad for convenience, so the current behavior will look like:Motivation behind this is that many useful FP libraries by default expects to work with some general kind, so they don't return simple an
A
, but return instead aEither[A, Error]
.