package awsm

  1. Overview
  2. Docs

Monad type class. The technique used here relies on lightweight higher-kinded polymorphism as described by Yallop and White in FLOPS (2014). Familiarity with the concepts in that paper is a prerequisite to understanding this module. However, most users do not need to understand this module since common useful instances of the abstract types here are provided elsewhere.

type (+'x, 'f) app
module type S = sig ... end
module Make (T : sig ... end) : S with type 'a s = 'a T.t
type 'm t = {
  1. bind : 'a 'b. ('a, 'm) app -> ('a -> ('b, 'm) app) -> ('b, 'm) app;
  2. return : 'a. 'a -> ('a, 'm) app;

Monad type class. The monad type is the type parameter 'm, and the monadic operations are provided as a dictionary of functions.


Innovation. Community. Security.