Commits

Sebastien Mondet  committed 3161575

doc,pvem: add some documentation

  • Participants
  • Parent commits 4ab8efa

Comments (0)

Files changed (1)

-
+(** Reusable Error Monads *)
 (**
 
-
+This whole module is about using {[
+type ('a, 'b) t = [
+  | `Ok of 'a
+  | `Error of 'b
+]
+]}
 
 *)
 
+(** The basic error monad signature. *)
 module type ERROR_MONAD = sig
   type ('a, 'b) t
   val return: 'a -> ('a, 'b) t
   val (>>|): ('a, 'b) t -> ('a -> 'c) -> ('c, 'b) t
 end
 
+(** The signature of the [Result] module: [ERROR_MONAD] + exposed result type. *)
 module type RESULT = sig
   include ERROR_MONAD with type ('a, 'b) t = [
     | `Ok of 'a
   ]
 end
 
+(** Implementation of [RESULT] *)
 module Result : RESULT = struct
 
   type ('a, 'b) t = [
 
 end
 
+(** The signature of a basic “thread” module called [Deferred] (like [Lwt]). *)
 module type DEFERRED = sig
 
   type 'a t
 
 end
 
+(** The result of the functor application: [With_deferred(Deferred)]. *)
 module type DEFERRED_RESULT = sig