IO

object IO extends IOInstances
Companion
class
class Object
trait Matchable
class Any

Type members

Types

type RunInBase[M[_], Base[_]] = Forall[[α] =>> M[α] => Base[M[α]]]

Value members

Concrete methods

def apply[A](a: => A): IO[A]
def controlIO[M[_], A](f: RunInBase[M, IO] => IO[M[A]])(implicit M: MonadControlIO[M]): M[A]
def getChar: IO[Char]

Reads a character from standard input.

Reads a character from standard input.

def hoistRunInBase[F[_], G[_]](r: RunInBase[G, IO])(implicit iso: IsoFunctor[F, G]): RunInBase[F, IO]

Hoist RunInBase given a natural isomorphism between the two functors

Hoist RunInBase given a natural isomorphism between the two functors

def idLiftControl[M[_], A](f: RunInBase[M, M] => M[A])(implicit m: Monad[M]): M[A]
def io[A](f: Tower[IvoryTower] => Trampoline[(Tower[IvoryTower], A)]): IO[A]

Construct an IO action from a world-transition function.

Construct an IO action from a world-transition function.

def newIORef[A](a: => A): IO[IORef[A]]
def onExit[S, P[_] : MonadIO](finalizer: IO[Unit]): RegionT[S, P, FinalizerHandle[[_] =>> RegionT[S, P, _$15]]]

Register a finalizer in the current region. When the region terminates, all registered finalizers will be performed if they're not duplicated to a parent region.

Register a finalizer in the current region. When the region terminates, all registered finalizers will be performed if they're not duplicated to a parent region.

def put[A](a: A)(implicit S: Show[A]): IO[Unit]
def putChar(c: Char): IO[Unit]

Writes a character to standard output.

Writes a character to standard output.

def putLn[A](a: A)(implicit S: Show[A]): IO[Unit]
def putStr(s: String): IO[Unit]

Writes a string to standard output.

Writes a string to standard output.

def putStrLn(s: String): IO[Unit]

Writes a string to standard output, followed by a newline.

Writes a string to standard output, followed by a newline.

def readLn: IO[String]

Reads a line of standard input.

Reads a line of standard input.

def runRegionT[P[_] : MonadControlIO, A](r: Forall[RegionT]): P[A]

Execute a region inside its parent region P. All resources which have been opened in the given region and which haven't been duplicated using "dup", will be closed on exit from this function whether by normal termination or by raising an exception. Also all resources which have been duplicated to this region from a child region are closed on exit if they haven't been duplicated themselves. The Forall quantifier prevents resources from being returned by this function.

Execute a region inside its parent region P. All resources which have been opened in the given region and which haven't been duplicated using "dup", will be closed on exit from this function whether by normal termination or by raising an exception. Also all resources which have been duplicated to this region from a child region are closed on exit if they haven't been duplicated themselves. The Forall quantifier prevents resources from being returned by this function.

def tailrecM[A, B](f: A => IO[A \/ B])(a: A): IO[B]
def throwIO[A](e: Throwable): IO[A]

Throw the given error in the IO monad.

Throw the given error in the IO monad.

Concrete fields

val ioUnit: IO[Unit]

An IO action that does nothing.

An IO action that does nothing.

Implicits

Implicits

implicit
def IOToST[A](io: IO[A]): ST[IvoryTower, A]

An IO action is an ST action.

An IO action is an ST action.

Inherited implicits

implicit
def IOMonoid[A](implicit A: Monoid[A]): Monoid[IO[A]]
Inherited from
IOInstances0
implicit
def IOSemigroup[A](implicit A: Semigroup[A]): Semigroup[IO[A]]
Inherited from
IOInstances1
implicit
Inherited from
IOInstances1
implicit
Inherited from
IOInstances
implicit
Inherited from
IOInstances1
Inherited from
IOInstances
implicit
Inherited from
IOInstances0