package sugar

  1. Overview
  2. Docs

How to create a strict result monad:

module MyError = struct
  type t = A | B | Unexpected of exn

  let panic e = Unexpected e
end

module MyResult = Sugar.Result.Make (MyError)

The generated module will have the signature of Sugar.S.Strict_result

A parametric module that implements the blocking interface.

OCaml

Innovation. Community. Security.