Idris2Doc : Control.Monad.JustAMonad

Control.Monad.JustAMonad

(source)

Reexports

import public System.Clock

Definitions

Arrow : Type -> Type -> Type
Visibility: public export
data Channel : Type
Totality: total
Visibility: public export
Constructors:
Timing : Channel
Debug : Channel

Hints:
Eq Channel
Show Channel
channelShow : Show Channel
Visibility: export
Subset : Type -> Type
Visibility: public export
M : Type -> Type -> Type -> Type
  Failure over stateful computation wrapped in IO.

Visibility: public export
(>>=) : M e s a -> (a -> M e s b) -> M e s b
  Chain computations. Main ingredient for overloaded do-notation.

Visibility: public export
Fixity Declaration: infixl operator, level 1
(=<<) : (a -> M e s b) -> M e s a -> M e s b
Visibility: public export
Fixity Declaration: infixl operator, level 1
(>=>) : (a -> M e s b) -> (b -> M e s c) -> a -> M e s c
  Composition of monadic functions.

Visibility: public export
Fixity Declaration: infixl operator, level 1
(<=<) : (b -> M e s c) -> (a -> M e s b) -> a -> M e s c
Visibility: public export
Fixity Declaration: infixl operator, level 1
(>>) : M e s () -> M e s b -> M e s b
Visibility: public export
Fixity Declaration: infixl operator, level 1
return : a -> M e s a
  Wrap a pure result in a computation/monad.

Visibility: public export
throw : e -> M e s a
  Throw an error.

Visibility: public export
get : M e s s
  Get the state.

Visibility: public export
set : s -> M e s ()
Visibility: public export
update : (s -> s) -> M e s ()
  Update the state.

Visibility: public export
mapError : (e -> e') -> M e s a -> M e' s a
Visibility: public export
mapState : (s -> s') -> (s' -> s) -> M e s a -> M e s' a
Visibility: public export
mapResult : (a -> b) -> M e s a -> M e s b
Visibility: public export
(<$>) : (a -> b) -> M e s a -> M e s b
Visibility: public export
Fixity Declaration: infixr operator, level 4
(<&>) : M e s a -> (a -> b) -> M e s b
Visibility: public export
Fixity Declaration: infixl operator, level 1
(<*>) : M e s (a -> b) -> M e s a -> M e s b
Visibility: public export
Fixity Declaration: infixl operator, level 3
fromEither : Either e a -> M e s a
Visibility: public export
run : M e s r -> s -> IO (Either e (s, r))
  Runs gathering output from all channels.

Visibility: public export
eval : M e s r -> s -> IO (Either e r)
  Runs gathering output from all channels, throws away the resulting state.

Visibility: public export
discard : M e s a -> M e s ()
  Run the computation and discard its result.

Visibility: public export
when : Bool -> M e s () -> M e s ()
  Run the computation when the condition is true.

Visibility: public export
isListening : Channel -> M e s Bool
  Check if the channel is listened.

Visibility: public export
doListen : Channel -> Bool -> M e s ()
  Sets whether to listen or not on that channel.

Visibility: public export
sequenceMaybe : Maybe (M e s a) -> M e s (Maybe a)
Visibility: public export
sequenceList : List (M e s a) -> M e s (List a)
Visibility: public export
sequenceVect : Vect n (M e s a) -> M e s (Vect n a)
Visibility: public export
sequenceSnocList : SnocList (M e s a) -> M e s (SnocList a)
Visibility: public export
sequenceList1 : List1 (M e s a) -> M e s (List1 a)
Visibility: public export
sequenceProduct : (M e s a, M e s b) -> M e s (a, b)
Visibility: public export
sequenceEither : Either (M e s a) (M e s b) -> M e s (Either a b)
Visibility: public export
forList : List a -> (a -> M e s b) -> M e s (List b)
  Run a computation for each element of the list and join the results.

Visibility: public export
forProduct : (a, b) -> (a -> M e s a') -> (b -> M e s b') -> M e s (a', b')
  Run a computation for each element of the pair and join the results.

Visibility: public export
traverseProduct : (a -> M e s a') -> (b -> M e s b') -> (a, b) -> M e s (a', b')
Visibility: public export
forCatMaybes : List a -> (a -> M e s (Maybe b)) -> M e s (List b)
Visibility: public export
forList1 : List1 a -> (a -> M e s b) -> M e s (List1 b)
  Run a computation for each element of the List1 and join the results.

Visibility: public export
forSnocList : SnocList a -> (a -> M e s b) -> M e s (SnocList b)
  Run a computation for each element of the SnocList and join the results.

Visibility: public export
traverseSnocList : (a -> M e s b) -> SnocList a -> M e s (SnocList b)
Visibility: public export
traverseList : (a -> M e s b) -> List a -> M e s (List b)
Visibility: public export
traverseList1 : (a -> M e s b) -> List1 a -> M e s (List1 b)
Visibility: public export
traverseList_ : (a -> M e s ()) -> List a -> M e s ()
Visibility: public export
traverseList1_ : (a -> M e s ()) -> List1 a -> M e s ()
Visibility: public export
forVect : Vect n a -> (a -> M e s b) -> M e s (Vect n b)
  Run a computation for each element of the Vect and join the results.

Visibility: public export
forMaybe : Maybe a -> (a -> M e s b) -> M e s (Maybe b)
  Run a computation for each element of the Maybe and join the results.

Visibility: public export
traverseMaybe : (a -> M e s b) -> Maybe a -> M e s (Maybe b)
Visibility: public export
forList_ : List a -> (a -> M e s b) -> M e s ()
Visibility: public export
forSnocList_ : SnocList a -> (a -> M e s b) -> M e s ()
Visibility: public export
forVect_ : Vect n a -> (a -> M e s b) -> M e s ()
Visibility: public export
filterMaybeListM : List a -> (a -> M e s (Maybe b)) -> M e s (List b)
Visibility: public export
try : M e s a -> M e s (Either e a)
  Never fails.

Visibility: public export
one : M e s a -> M e s b -> M e s (Either a b)
  Either one must work. Tries the left one first.

Visibility: public export
both : M e s a -> M e s b -> M e s (a, b)
  Both must work. Tries the left one first.

Visibility: public export
(<|>) : M e s a -> M e s a -> M e s a
  First working alternative.

Visibility: public export
Fixity Declaration: infixr operator, level 2
allList : List (M e s Bool) -> M e s Bool
Visibility: public export
or : M e s Bool -> M e s Bool -> M e s Bool
  Lazy logical disjunction.

Visibility: public export
Fixity Declaration: infixr operator, level 7
and : M e s Bool -> M e s Bool -> M e s Bool
  Lazy logical conjunction.

Visibility: public export
Fixity Declaration: infixr operator, level 8
io : IO a -> M e s a
Visibility: public export
data OutputMode : Type
Totality: total
Visibility: public export
Constructors:
STDOUT : OutputMode
FILE : String -> OutputMode
print_ : Channel -> OutputMode -> String -> M e s ()
  Eagerly prints something out (using IO) on the given channel.

Visibility: public export
timestamp : M e s (Clock Process)
Visibility: public export
gcTimestamp : FromString e => M e s (Clock GCCPU)
Visibility: public export
formatted : Clock type -> String
Visibility: public export
clock : FromString e => String -> M e s a -> M e s a
  Clocks the given computation, prints out (eagerly) the time it took to run the computation.

Visibility: public export
clockWhen : FromString e => Bool -> String -> M e s a -> M e s a
  Clocks the given computation when the condition is true, prints out (eagerly) the time it took to run the computation.

Visibility: public export
clockThresholdD : FromString e => (a -> M e s String) -> Integer -> M e s a -> M e s a
Visibility: public export
clockThreshold : FromString e => String -> Integer -> M e s a -> M e s a
  Clocks the given computation, prints out (eagerly) the time it took to run the computation.

Visibility: public export
write : String -> M e s ()
  Currently, write is just an alias to print_ on *Debug* channel.
So all output of write is eagerly shown in console.

Visibility: public export
time : FromString e => M e s a -> M e s (a, Clock Duration)
  Computes the workload time (process time - GC time)

Visibility: public export