14 ms·
Pure actions can be run in parallel with https://hackage-content.haskell.org/package/parallel/docs/Control-Parallel.html https://hackage-content.haskell.org/pac
by iviv 10mo ago
Pure actions can be run in parallel with https://hackage-content.haskell.org/package/parallel/docs/Control-Parallel.html https://hackage-content.haskell.org/package/parallel/docs/Co...
Impure actions use the IO monad like always in Haskell: https://hackage.haskell.org/package/base-4.21.0.0/docs/Control-Concurrent.html https://hackage.haskell.org/package/base-4.21.0.0/docs/Contr... (or the higher-level async library)
I suppose an extreme version of the function coloring argument could be that all types are colors.
- debugnik 10mo agoIn a sense, kinda? The function colour problem is that you can't call an async API from a non-async caller without modifying the entire call chain (or blocking the full thread). In async/await languages the conflict comes from changing the return types; the syntax is orthogonal. Maybe in practice some properties of code are better off being whole-program than represented as types, even if they're less modular or harder to check. Also thanks for the reference, I haven't touched Haskell in ages; I'm more of an F# and OCaml guy.
- iviv 10mo agoRight. In Haskell we want to maintain the pure/impure distinction so… it’s not a problem I guess?