package preface

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

A Free applicative allows you to build an Preface_specs.Applicative from a given Preface_specs.Functor.

Such Preface_specs.Applicative is equipped with and additional function for promoting values from the underlying Preface_specs.Functor into the Free applicative and a Natural transformations for transforming the value of the Free applicative to an other Preface_specs.Applicative or to a Preface_specs.Monoid.

Note about complexity

Although free constructs are elegant, they introduce an execution cost due to the recursive nature of defining the type of a Free Applicative. There are cheaper encodings but they are not, for the moment, available in Preface.

Structure anatomy

module type TO_APPLICATIVE = sig ... end

The natural transformation for Free Applicative to Applicative.

module type TO_MONOID = sig ... end

The natural transformation for Free Applicative to Monoid.

module type CORE = sig ... end

The Free applicative API without the Preface_specs.Applicative API.

Complete API

module type API = sig ... end

The complete interface of a Free applicative.

Additional references

OCaml

Innovation. Community. Security.