package ocsigenserver
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=ecf37dc2e2ad43f38dfcca8f87ca04a9
sha512=96dffc87f11b82b810d95d6e0cad69ce12a6763425e6e59f211dd71492d777a0cd1aeca722c0c9fd9ec8bb55cad7ae0ba1c781a8129a18de86f0f3accb278118
doc/ocsigenserver.baselib/Ocsigen_lib/index.html
Module Ocsigen_libSource
This module contains some auxiliaries for the Ocsigenserver. In contrast to Ocsigen_lib_base, the function may also refer to libraries other than the standard library.
include module type of Ocsigen_lib_base
with type poly = Ocsigen_lib_base.poly
and type yesnomaybe = Ocsigen_lib_base.yesnomaybe
and type ('a, 'b) leftright = ('a, 'b) Ocsigen_lib_base.leftright
and type 'a Clist.t = 'a Ocsigen_lib_base.Clist.t
and type 'a Clist.node = 'a Ocsigen_lib_base.Clist.node
include module type of Lwt.Infix
p >>= f is the same as Lwt.bind p f. It requires Lwt.Infix to be opened in scope:
open Lwt.Infix
let () =
Lwt_main.run
(Lwt_io.(read_line stdin) >>= Lwt_io.printl)
(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)It is recommended to use the PPX let%lwt syntax instead. This operator is the next-best choice. It is frequently found while reading existing Lwt code.
p >|= f is the same as Lwt.map f p. It requires Lwt.Infix to be opened in scope.
open Lwt.Infix
let () =
Lwt_main.run
(Lwt_io.(read_line stdin) >|= ignore)
(* ocamlfind opt -linkpkg -thread -package lwt.unix code.ml && ./a.out *)p1 <?> p2 is the same as Lwt.choose [p1; p2]. It requires Lwt.Infix to be opened in scope.
Unlike with Lwt.bind and Lwt.map, there are no problems with explicit Lwt.choose syntax, so using this operator is not recommended.
Furthermore, most users actually need Lwt.pick instead of Lwt.choose.
f =<< p is the same as Lwt.bind p f. It requires Lwt.Infix to be opened in scope.
This operator is obscure and its use is discouraged. It is the same as p >>= f.
f =|< p is the same as Lwt.map f p. It requires Lwt.Infix to be opened in scope.
This operator is obscure and its use is discouraged. It is the same as p >|= f.
module Let_syntax : sig ... endThis module provides support for ppx_let.
val (!!) : 'a Lazy.t -> 'amodule Tuple3 : sig ... endtype poly = Ocsigen_lib_base.polyval to_poly : 'a -> polyval from_poly : poly -> 'amodule Option : sig ... endModule Option to compute type 'a option
module List : sig ... endImprovement of module List
module Clist : sig ... endCircular lists
module Int : sig ... endmodule String_base : sig ... endImprovement of module String
module Url_base : sig ... endGenerate an unique and cryptographically safe random string. It is impossible to guess for other people and will never return twice the same value (with very good probabilities).
module String : module type of String_baseImprovement of module String