Closed snowleopard closed 6 years ago
@ndmitchell @simonpj I'd like to hear your thoughts on this.
P.S. I'm also working on a couple of other approaches, so perhaps a better one will be found. This one is finished though, so it's worth considering it as a possible design point.
I like it. The wrap is tedious, but occurs infrequently and doesn't really obscure the point where it does arise. Suggest we go with it, at least for now.
@ndmitchell Thanks! I think we need unwrapping only when we are extracting a Task
from Tasks
, which doesn't happen too often.
Merged. There is an alternative approach suggested by @simonpj: use newtype Task
and add a lift
function to convert between Task Applicative
and Task Monad
, etc. I'll explore this in a separate branch.
This PR brings back higher-rank polymorphism both for
Task
andTasks
:Tasks Applicative
.trackM
toTask Applicative
.This allows us to get rid of mostly identical applicative and monadic variants of tracing strategies.