package preface

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

The natural transformation for Freer Monad to Monad.

type 'a t

The type held by the Freer monad.

type 'a f

The parametric type (which, unlike a Preface_specs.Free_monad don't need to be a Preface_specs.Functor).

type 'a monad

The type held by the Monad.

type ('a, 'b) handle = ('a -> 'b monad) -> 'a f -> 'b monad
type 'a handler = {
  1. handler : 'b. ('b, 'a) handle;
}

The handler type. Which is a Natural transformation from the Freer Monad to the given Monad.

val run : 'a handler -> 'a t -> 'a monad

Run the natural transformation over the Free monad.