Traced.Core_over_comonad
module C : Preface_specs.COMONAD
module Tape : Preface_specs.MONOID
type tape = Tape.t
The parameter which is a monoid.
type 'a comonad = 'a C.t
The inner comonad.
type 'a t = (tape -> 'a) comonad
The type held by the traced comonad.
val lower : 'a t -> 'a comonad
get the underlying comonad.
val run : 'a t -> (tape -> 'a) comonad
Unwrap the traced computation.
val trace : tape -> 'a t -> 'a
Extracts the value at the current position.
val traces : ('a -> tape) -> 'a t -> 'a
Extracts the value at a relative position.
val listen : 'a t -> ('a * tape) t
Get the current position.
val listens : (tape -> 'b) -> 'a t -> ('a * 'b) t
Get the current position relatively.
val censor : (tape -> tape) -> 'a t -> 'a t
Apply a function to the current position.