You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gen is not a monad transformer right now, therefore it cannot be combined with additional monadic effects. The main reason for this is that we use a Cotree codata type for shrinking, and it is hard to combine this with monadic effects in a provably total way.
Does this mean it's not possible to write tests when the result is in an IO? For example, testing the Nat in the output of
foo : Nat -> IO Nat
The text was updated successfully, but these errors were encountered:
I'm truly sorry I missed this question. Right now, there seems no easy way to do this other than using unsafePerformIO. I'll have to think some more about how easy it will be to test computations with side effects.
OK, thanks, and not a problem. I don't particularly care about testing the side effects themselves at the moment. I'm mostly interested in the contained value.
Forgive the naive question, but when you say
Does this mean it's not possible to write tests when the result is in an
IO
? For example, testing theNat
in the output ofThe text was updated successfully, but these errors were encountered: