Skip to content

Allow use of Task, as opposed to Task<'T> in do! statements #43

@abelbraaksma

Description

@abelbraaksma

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttopic: taskseq-ceRelated to the taskseq computation expression builders or overloads

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions