News for hackers. Stuff that matters.
Re:Testable IO in Haskell by pron on Sunday June 21, 2015 @09:27AM (#9753343)
Why, for testing. The calls to IO are replaced with calls to mocks which are then used to verify IO behavior. It's like replacing the IO monad with a type that doesn't actually do IO, only it doesn't require the code to change, so it works even for third-party code.

You can then use the security manager during the test to verify that all IO calls are indeed mocked.

There are no comments on this comment yet.