Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async ce inside a Result ce #94

Closed
arunr14 opened this issue Jul 23, 2020 · 2 comments
Closed

Async ce inside a Result ce #94

arunr14 opened this issue Jul 23, 2020 · 2 comments

Comments

@arunr14
Copy link

arunr14 commented Jul 23, 2020

Hello

I am using 1.4.3
Is it possible to have an async ce inside a result ce ? I am trying to do the following

someResult
|> Result.bind (
   fun okValue ->
      result{
           let! (x: returnType) = async { return someAsynFunc okValue }
           return Ok (x)
      })

and it gives me an error saying No overloads match for method source.
I have read through issue 84 and 88 but I am still unclear on the matter. Any help is appreciated.

Thanks

@TheAngryByrd
Copy link
Collaborator

No this is not possible. Result CEs are for synchronous work while AsyncResult is for Async work. You'll have to convert the entire chain to using asyncResult if you're using F#'s Async CE anywhere.

@arunr14
Copy link
Author

arunr14 commented Jul 23, 2020

Thank you for the clarification. Closing the issue

@arunr14 arunr14 closed this as completed Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants