Haskell provides Monadic programming constructs to enable
computations that may involve side effects, one of the main
Monads provided in Haskell is the IO Monad, which contains all
the various IO functions that can be used in a Haskell program.
Monads are used to contain impure functions that can produce
side effects, and rap them so as to create pure functions whose
results may include a description of any side-effects that
occurred. These Monadic bindings enable any side effects that
may occur to propagate through the program until they can be
sensibly dealt with. A monad in Haskell is defined as a type
constructor, along with a function, and a bind function denoted
. The return function is used to put values of any datatype into
the monad, and the bind function is used to apply functions of
datatypes outside the monad to the value of that datatype
contained within the monad. The result of the function being
bound must be in the monad. The type constructor for the QIO
monad is: the return function can simpl