3 ms·
You're essentially correct. IO is there to mark functions that perform IO, to make it easier to separate them from the pure functions. The "monadic" part is pr
by Rusky 12y ago
You're essentially correct. IO is there to mark functions that perform IO, to make it easier to separate them from the pure functions.
The "monadic" part is pretty much a red herring. It's just how Haskell happens to implement this separation. It could also be implemented as an "effect system" built into the language, or any number of other ways.