Sometimes you want to run operation in parallel that depends on a previous result that may be an option, for example:
for {
someOption <- op1
val op2 = someOption.map(op2).getOrElse(FreeS.pure(()))
val op3 = someOption.map(op3).getOrElse(FreeS.pure(()))
_ <- (op2, op3).tupled
} yield ()
Currently you cannot do this as FreeS.pure returns FreeS[F, A] and not FreeS.Par[F, A]. For now I just wrote an additional utilities algebra with one of the operations being pure and that gives me the type that allows for parallelism.
Sometimes you want to run operation in parallel that depends on a previous result that may be an option, for example:
Currently you cannot do this as
FreeS.purereturnsFreeS[F, A]and notFreeS.Par[F, A]. For now I just wrote an additional utilities algebra with one of the operations beingpureand that gives me the type that allows for parallelism.