It depends what you mean by "switch", which is a very vague term. IO actions in Haskell are just ordinary values, and you sequence them using ordinary functions. How is that different from chaining pure computations, which I can do using the exact same do syntax if I really wanted to.
There are also implementations of restricted IO in Haskell which I find particularly interesting. Not just "you can only do IO in this little box" but "you can only do this particular kind of IO in this little box".
0
u/[deleted] Apr 27 '14
[deleted]