package bastet

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

Module Bastet.OptionSource

Option is the equivalent of Maybe in Haskell for Ocaml

Sourceval (<.) : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
Sourceval maybe : f:('a -> 'b) -> default:'b -> 'a option -> 'b
Sourceval getWithDefault : 'a -> 'a option -> 'a
Sourcemodule type MAGMA_F = functor (M : Interface.MAGMA) -> Interface.MAGMA with type t = M.t option
Sourcemodule type SEMIGROUP_F = functor (S : Interface.SEMIGROUP) -> Interface.SEMIGROUP with type t = S.t option
Sourcemodule type MONOID_F = functor (S : Interface.SEMIGROUP) -> Interface.MONOID with type t = S.t option

A MONOID only needs to be commutative with the empty element.

Sourcemodule type QUASIGROUP_F = functor (Q : Interface.QUASIGROUP) -> Interface.QUASIGROUP with type t = Q.t option
Sourcemodule type LOOP_F = functor (L : Interface.LOOP) -> Interface.LOOP with type t = L.t option

A LOOP only needs to be commutative with the empty element.

Sourcemodule type EQ_F = functor (E : Interface.EQ) -> Interface.EQ with type t = E.t option
Sourcemodule type ORD_F = functor (O : Interface.ORD) -> Interface.ORD with type t = O.t option
Sourcemodule type SHOW_F = functor (S : Interface.SHOW) -> Interface.SHOW with type t = S.t option
Sourcemodule type TRAVERSABLE_F = functor (A : Interface.APPLICATIVE) -> Interface.TRAVERSABLE with type 'a t = 'a option and type 'a applicative_t = 'a A.t
Sourcemodule Functor : Interface.FUNCTOR with type 'a t = 'a option
Sourcemodule Apply : Interface.APPLY with type 'a t = 'a option
Sourcemodule Applicative : Interface.APPLICATIVE with type 'a t = 'a option
Sourcemodule Monad : Interface.MONAD with type 'a t = 'a option
Sourcemodule Semigroup (S : Interface.SEMIGROUP) : sig ... end

A MONOID only needs to be commutative with the empty element.

A LOOP only needs to be commutative with the empty element.

Sourcemodule Alt : Interface.ALT with type 'a t = 'a option
Sourcemodule Plus : Interface.PLUS with type 'a t = 'a option
Sourcemodule Alternative : Interface.ALTERNATIVE with type 'a t = 'a option
Sourcemodule Foldable : Interface.FOLDABLE with type 'a t = 'a option
Sourcemodule Traversable (A : Interface.APPLICATIVE) : sig ... end
Sourcemodule Eq : EQ_F
Sourcemodule Ord : ORD_F
Sourcemodule Infix : sig ... end
OCaml

Innovation. Community. Security.