Idris2Doc : Control.RIO.App

Control.RIO.App

(source)

Reexports

importpublic Data.List.Quantifiers.Extra
importpublic Control.RIO

Definitions

0App : ListType->Type->Type
  A `RIO` computation, which can fail with one of several errors.

Totality: total
Visibility: public export
throw : Hasxxs=>x->Appxsa
  Throw an exception to be caught in the `App` monad.

The error type has to be in the list of accepted errors.

Totality: total
Visibility: export
injectRIO : Hasxxs=>RIOxa->Appxsa
  Inject a `RIO` computation into one dealing with several
possible errors.

Totality: total
Visibility: export
injectEither : Hasxxs=>Eitherxa->Appxsa
  Inject an `Either x a` computation into a `RIO` monad dealing
with several possible errors.

Totality: total
Visibility: export
injectIO : Hasxxs=>IO (Eitherxa) ->Appxsa
  Inject an `IO (Either x a)` computation into a `RIO` monad dealing
with several possible errors.

Totality: total
Visibility: export
0Handler : Type->Type->Type
  An error handler.

Totality: total
Visibility: public export
handle : {autoprf : Hasxxs} ->Handlerax->Appxsa->App (xs-x) a
  Handle a single error type in an application.

This removes the error type from the list of possible errors
in the resulting `App` type.

Totality: total
Visibility: export
handleAll : All (Handlera) xs=>Appxsa->RIOVoida
  Handle all errors, converting the computation to one that cannot fail.

Totality: total
Visibility: export
handleAllDflt : All (Handler ()) xs=>a->Appxsa->RIOVoida
  Handle all errors, converting the computation to one that cannot fail.

This yields the provided default value in case of an error.

Totality: total
Visibility: export
runApp : All (Handler ()) xs->Appxs () ->IO ()
  Run an application handling all errors. This can be invoked
directly from an applcation's `main` function. It invokes
`exitFailure` in case of an error.

Totality: total
Visibility: export