[Haskell-cafe] Simplest way to move a ... `using` ... line into the IO monad?

David Banas capn.freako at gmail.com
Fri Oct 27 18:36:53 UTC 2023


Hi all,

What is the simplest way to translate a non-monadic line of Haskell code, such as:

res = map foo xs `using` parList rseq

For use in the IO monad?

This doesn’t work:

res <- mapM fooM xs `using` parTraversable rseq

complaining:

No Traversable instance for IO.

Thanks,
-db

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20231027/f16d62d2/attachment.html>


More information about the Haskell-Cafe mailing list