Copyright | © 2017 All rights reserved. |
---|---|
License | GPL-3 |
Maintainer | Evan Cofsky <evan@theunixman.com> |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
- module Control.Monad.Base
- module Control.Monad.Trans.Control
- data IO a :: * -> *
Documentation
module Control.Monad.Base
module Control.Monad.Trans.Control
A value of type
is a computation which, when performed,
does some I/O before returning a value of type IO
aa
.
There is really only one way to "perform" an I/O action: bind it to
Main.main
in your program. When your program is run, the I/O will
be performed. It isn't possible to perform I/O from an arbitrary
function, unless that function is itself in the IO
monad and called
at some point, directly or indirectly, from Main.main
.
IO
is a monad, so IO
actions can be combined using either the do-notation
or the >>
and >>=
operations from the Monad
class.
Monad IO | Since: 2.1 |
Functor IO | Since: 2.1 |
MonadFix IO | Since: 2.1 |
MonadFail IO | Since: 4.9.0.0 |
Applicative IO | Since: 2.1 |
Alternative IO | Since: 4.9.0.0 |
MonadPlus IO | Since: 4.9.0.0 |
MonadIO IO | Since: 4.9.0.0 |
MonadThrow IO | |
MonadCatch IO | |
MonadMask IO | |
PrimMonad IO | |
PrimBase IO | |
Quasi IO | |
MonadBaseControl IO IO | |
MonadBase IO IO | |
Semigroup a => Semigroup (IO a) | Since: 4.10.0.0 |
Monoid a => Monoid (IO a) | Since: 4.9.0.0 |
type PrimState IO | |
type StM IO a | |