On Tue, Oct 15, 2013 at 5:00 AM, Kees Bleijenberg <k.bleijenberg@lijbrandt.nl> wrote:

I wonder, do you always have to create a monadtransformer if your program uses 2 kinds of IO?


In one sense the answer is "yes"; but the real answer is "that's not how it works". There is only one IO. Monad transformers allow you to add functionality on top of it, but at some point you need to do actual I/O in the IO monad.

One reason it's done this way is that CGIT could in theory be written such that you could swap out the raw IO monad for something that lets you do testing.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net