8 ms·
If you want a function to be usable in both an async and a non-async environment, the monads in question are ones for async and identity, not IO. The choice bet
by codebje 1y ago
If you want a function to be usable in both an async and a non-async environment, the monads in question are ones for async and identity, not IO. The choice between a true concurrent runtime and a single threaded cooperative coroutine runtime is up to you in GHC Haskell.
Monad-agnostic functions are exactly looking upwards to allow the calling context to determine behaviour.