Skip to content
Snippets Groups Projects
Commit 2482c5e7 authored by Thibault Martin's avatar Thibault Martin Committed by Maxime Jacquemin
Browse files

[doc] Fix odoc bullets

parent 2f673a64
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,8 @@
(* *)
(**************************************************************************)
(** This module provides a generic monad interface based on Keisli and Categoric
defintion of monads. *)
(** {2 Kleisli triple signature for a monadic type constructor ['a t]}
......@@ -115,7 +117,9 @@ end
nested applications of the monad. It must also satisfy some laws :
2. ∀m:('a t t t), [map flatten (flatten m) ≣ flatten (flatten m)]
3. ∀m:('a t), [flatten (map return m) ≣ flatten (return m) ≣ m]
4. ∀m:('a t t), ∀f: ('a -> 'b), [flatten (map (map f) m) ≣ map f (flatten m)]
As there is no way in the OCaml type system to enforce those properties,
......@@ -162,7 +166,9 @@ end
using the operations required by the others. Indeed :
1. ∀m:('a t), ∀f:('a -> 'b), [map f m ≣ bind (fun x -> return (f x)) m]
2. ∀m:('a t t), [flatten m ≣ bind identity m]
3. ∀m:('a t), ∀f:('a -> 'b t), [bind f m ≣ flatten (map f m)]
All required laws expressed in both minimal signatures are respected
......
......@@ -20,8 +20,11 @@
(* *)
(**************************************************************************)
(* Adding let binding operators to the Result module. See
https://v2.ocaml.org/manual/bindingops.html for more information. *)
(** Adding let binding operators to the Result module.
@see <https://v2.ocaml.org/manual/bindingops.html>
This module does not use the generic monad interface (cf. {!Monad}) because
of the error type, which would require another layer of functors.
*)
include module type of Stdlib.Result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment