monad_writer

An implementation of MonadReader. It does not contain local because this function cannot be lifted using monad_lift. Instead, the monad_reader_adapter class provides the more general adapt_reader function.

Note: This class can be seen as a simplification of the more "principled" definition

class monad_reader (ρ : out_param (Type u)) (n : Type u Type u) :=
(lift {} {α : Type u} : (∀ {m : Type u Type u} [monad m], reader_t ρ m α)  n α)

monad_writer_adapter

Adapt a monad stack, changing the type of its top-most environment.

This class is comparable to Control.Lens.Magnify, but does not use lenses (why would it), and is derived automatically for any transformer implementing monad_functor.

Note: This class can be seen as a simplification of the more "principled" definition

class monad_reader_functor (ρ ρ' : out_param (Type u)) (n n' : Type u Type u) :=
(map {} {α : Type u} : (∀ {m : Type u Type u} [monad m], reader_t ρ m α  reader_t ρ' m α)  n α  n' α)