3 ms·
We use the asyncMaybe CE extensively in the Visual Studio tooling for F# and although it's a little bit of boilerplate, in practice we don't need to lift an Asy
by phillipcarter 8y ago
We use the asyncMaybe CE extensively in the Visual Studio tooling for F# and although it's a little bit of boilerplate, in practice we don't need to lift an Async<'t> into an Async<'T option> very often. The worst example of this is probably this file: https://github.com/Microsoft/visualfsharp/blob/8ea71dd368401683fcbe895965c448c2688d3899/vsintegration/src/FSharp.Editor/Navigation/FindUsagesService.fs#L52 https://github.com/Microsoft/visualfsharp/blob/8ea71dd368401...
In most cases the APIs are uniform enough to where it's not a pain point.
- tombert 8y agoMy complaints are actually in the opposite direction, though I realize that I didn't explain this very well; I wanted to be able to use an Async<'T option> in already-existing async functions that weren't doing anything specific to async. A lot of my async stuff was just doing let! to "unbox" and returning at the end. In Haskell land I would have used something like (Monad m) => m a -> m b, and then I could throw any monad transformer into there.