package preface

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Operation of Traced comonad parametrized over an inner comonad and tape.

type tape

The parameter which is a monoid.

type 'a comonad

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.