Currently, this is not possible:
taskSeq {
do! Task.Delay 220 // fails, because this returns a Task, not a Task<unit>
}
Add necessary overloads for allowing this, similarly to how the task CE works.
Of note is that allowing Task can lead to unexpected behavior, as Task<'T> inherits from Task. However, we should strive to have parity with task in F#. to avoid surprises for users. Just like with normal task, we would still disallow do! task { return 10 }. This should be OK, as the F# compiler does not (yet) allow that kind of conversion.
Currently, this is not possible:
Add necessary overloads for allowing this, similarly to how the
taskCE works.Of note is that allowing
Taskcan lead to unexpected behavior, asTask<'T>inherits fromTask. However, we should strive to have parity withtaskin F#. to avoid surprises for users. Just like with normaltask, we would still disallowdo! task { return 10 }. This should be OK, as the F# compiler does not (yet) allow that kind of conversion.